diff options
Diffstat (limited to 'packages/backend/src/core/PushNotificationService.ts')
| -rw-r--r-- | packages/backend/src/core/PushNotificationService.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/backend/src/core/PushNotificationService.ts b/packages/backend/src/core/PushNotificationService.ts index 40d1deceeb..3b706d9854 100644 --- a/packages/backend/src/core/PushNotificationService.ts +++ b/packages/backend/src/core/PushNotificationService.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-FileCopyrightText: syuilo and misskey-project * SPDX-License-Identifier: AGPL-3.0-only */ @@ -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(); } |