From 83ebe79a3fe5ddb22e80d3b47b9e8ec0701286ad Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 10 Jul 2022 15:15:21 +0900 Subject: enhance(sw): If receiving a push notification issued more than a day, ignore it. (#8980) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance(sw): ignore old push notification * :v: * 半日 * !== * 1日 --- packages/backend/src/services/push-notification.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/backend/src/services') diff --git a/packages/backend/src/services/push-notification.ts b/packages/backend/src/services/push-notification.ts index 5c3bafbb34..393a23d050 100644 --- a/packages/backend/src/services/push-notification.ts +++ b/packages/backend/src/services/push-notification.ts @@ -64,6 +64,7 @@ export async function pushNotification(u type, body: type === 'notification' ? truncateNotification(body as Packed<'Notification'>) : body, userId, + dateTime: (new Date()).getTime(), }), { proxy: config.proxy, }).catch((err: any) => { -- cgit v1.2.3-freya