diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-30 07:33:58 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-30 07:33:58 +0900 |
| commit | a512915a8456359335e1bab1298715d81d6db3a5 (patch) | |
| tree | 36831199aab584b5034729a4ac3076fa1de4a3f8 /packages/backend/src/core/NotificationService.ts | |
| parent | fix (diff) | |
| download | sharkey-a512915a8456359335e1bab1298715d81d6db3a5.tar.gz sharkey-a512915a8456359335e1bab1298715d81d6db3a5.tar.bz2 sharkey-a512915a8456359335e1bab1298715d81d6db3a5.zip | |
fix(backend): Redisに古いMisskeyバージョンのキャッシュが残っている場合の問題を修正
Diffstat (limited to 'packages/backend/src/core/NotificationService.ts')
| -rw-r--r-- | packages/backend/src/core/NotificationService.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/backend/src/core/NotificationService.ts b/packages/backend/src/core/NotificationService.ts index ba8798f181..ca05989a4a 100644 --- a/packages/backend/src/core/NotificationService.ts +++ b/packages/backend/src/core/NotificationService.ts @@ -80,7 +80,10 @@ export class NotificationService implements OnApplicationShutdown { notifierId?: MiUser['id'] | null, ): Promise<MiNotification | null> { const profile = await this.cacheService.userProfileCache.fetch(notifieeId); - const recieveConfig = profile.notificationRecieveConfig[type]; + + // 古いMisskeyバージョンのキャッシュが残っている可能性がある + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + const recieveConfig = (profile.notificationRecieveConfig ?? {})[type]; if (recieveConfig?.type === 'never') { return null; } |