fix(backend): Redisに古いMisskeyバージョンのキャッシュが残っている場合の問題を修正

This commit is contained in:
syuilo 2023-09-30 07:33:58 +09:00
parent 5edc885c22
commit a512915a84
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}