From d42c4cce843d962d05205a732b113773e53e3c33 Mon Sep 17 00:00:00 2001 From: WuYongJie Date: Wed, 15 Jul 2026 20:33:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=9F=E4=B8=80=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=9D=A5=E6=BA=90=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/__tests__/server.test.ts | 2 +- src/server.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/server.test.ts b/src/__tests__/server.test.ts index 7c39892..655443c 100644 --- a/src/__tests__/server.test.ts +++ b/src/__tests__/server.test.ts @@ -43,7 +43,7 @@ test('通知中心验证签名、项目域名和幂等键', async () => { const first = await fetch(`http://127.0.0.1:${port}${path}`, { method: 'POST', headers: headers('POST', path, body), body }) assert.equal(first.status, 202) const firstPayload = await first.json() as any - assert.equal(firstPayload.title, '【由壹点·固定资产】待审批报废') + assert.equal(firstPayload.title, '【由壹点】固定资产·待审批报废') const second = await fetch(`http://127.0.0.1:${port}${path}`, { method: 'POST', headers: headers('POST', path, body), body }) assert.equal(second.status, 200) diff --git a/src/server.ts b/src/server.ts index c09c659..2922007 100644 --- a/src/server.ts +++ b/src/server.ts @@ -108,7 +108,7 @@ export const createServer = (projects: Map) => { if (title.length > 100 || content.length > 4800 || actionTitle.length > 20) return res.status(422).json({ error: 'MESSAGE_TOO_LONG' }) if (title.startsWith('【由壹点')) return res.status(422).json({ error: 'TITLE_BRAND_RESERVED' }) - const renderedTitle = `【由壹点·${project.name}】${title}` + const renderedTitle = `【由壹点】${project.name}·${title}` const normalized = { recipientUserId, title, content, actionTitle, actionUrl } const requestHash = sha256(JSON.stringify(normalized)) const existing = await prisma.notificationDelivery.findUnique({