From a512915a8456359335e1bab1298715d81d6db3a5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 30 Sep 2023 07:33:58 +0900 Subject: fix(backend): Redisに古いMisskeyバージョンのキャッシュが残っている場合の問題を修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/NotificationService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/backend/src/core/NotificationService.ts') 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 { 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; } -- cgit v1.2.3-freya