summaryrefslogtreecommitdiff
path: root/packages/backend/src/services
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2022-07-10 15:15:21 +0900
committerGitHub <noreply@github.com>2022-07-10 15:15:21 +0900
commit83ebe79a3fe5ddb22e80d3b47b9e8ec0701286ad (patch)
tree55ebb5ef0e28f3ae2ccc68b0565372815fad926e /packages/backend/src/services
parentfix(client): fix style of mention (diff)
downloadmisskey-83ebe79a3fe5ddb22e80d3b47b9e8ec0701286ad.tar.gz
misskey-83ebe79a3fe5ddb22e80d3b47b9e8ec0701286ad.tar.bz2
misskey-83ebe79a3fe5ddb22e80d3b47b9e8ec0701286ad.zip
enhance(sw): If receiving a push notification issued more than a day, ignore it. (#8980)
* enhance(sw): ignore old push notification * :v: * 半日 * !== * 1日
Diffstat (limited to 'packages/backend/src/services')
-rw-r--r--packages/backend/src/services/push-notification.ts1
1 files changed, 1 insertions, 0 deletions
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<T extends keyof pushNotificationsTypes>(u
type,
body: type === 'notification' ? truncateNotification(body as Packed<'Notification'>) : body,
userId,
+ dateTime: (new Date()).getTime(),
}), {
proxy: config.proxy,
}).catch((err: any) => {