summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/PushNotificationService.ts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2024-02-23 17:19:08 +0900
committerGitHub <noreply@github.com>2024-02-23 17:19:08 +0900
commitb8d8b359bc8a6c542d78b86f500e0f45f63f48fb (patch)
tree38ea8cd097d30bbab73d0850f74730ba2d9f167e /packages/backend/src/core/PushNotificationService.ts
parentFix(frontend): 絵文字オートコンプリートの優先順位がおか... (diff)
downloadsharkey-b8d8b359bc8a6c542d78b86f500e0f45f63f48fb.tar.gz
sharkey-b8d8b359bc8a6c542d78b86f500e0f45f63f48fb.tar.bz2
sharkey-b8d8b359bc8a6c542d78b86f500e0f45f63f48fb.zip
fix: プッシュ通知の変更が1時間ほど反映されない問題を修正 (#13407)
* fix: プッシュ通知の変更が1時間ほど反映されない問題を修正 * 410 to refresh * refreshCache
Diffstat (limited to 'packages/backend/src/core/PushNotificationService.ts')
-rw-r--r--packages/backend/src/core/PushNotificationService.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/backend/src/core/PushNotificationService.ts b/packages/backend/src/core/PushNotificationService.ts
index e630539fbc..3b706d9854 100644
--- a/packages/backend/src/core/PushNotificationService.ts
+++ b/packages/backend/src/core/PushNotificationService.ts
@@ -115,6 +115,8 @@ export class PushNotificationService implements OnApplicationShutdown {
endpoint: subscription.endpoint,
auth: subscription.auth,
publickey: subscription.publickey,
+ }).then(() => {
+ this.refreshCache(userId);
});
}
});
@@ -122,6 +124,11 @@ export class PushNotificationService implements OnApplicationShutdown {
}
@bindThis
+ public refreshCache(userId: string): void {
+ this.subscriptionsCache.refresh(userId);
+ }
+
+ @bindThis
public dispose(): void {
this.subscriptionsCache.dispose();
}