diff --git a/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts b/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts index d688c71cd5..c465e75944 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications-grouped.ts @@ -110,29 +110,6 @@ export default class extends Endpoint { // eslint- notifications = notifications.filter(notification => !excludeTypes.includes(notification.type)); } - //#region Check muting - - const [ - userIdsWhoMeMuting, - userMutedInstances, - ] = await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - this.cacheService.userProfileCache.fetch(me.id).then(p => new Set(p.mutedInstances)), - ]); - - notifications = (await Promise.all(notifications.map(async (notification): Promise => { - if (!('notifierId' in notification)) return notification; - if (userIdsWhoMeMuting.has(notification.notifierId)) return null; - - const notifier = await this.usersRepository.findOneBy({ id: notification.notifierId }); - if (notifier === null) return null; - if (notifier.host && userMutedInstances.has(notifier.host)) return null; - - return notification; - }))).filter((notification): notification is MiNotification => notification !== null); - - //#endregion Check muting - if (notifications.length === 0) { return []; } diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index 3714bbeac0..c738d90509 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -108,29 +108,6 @@ export default class extends Endpoint { // eslint- notifications = notifications.filter(notification => !excludeTypes.includes(notification.type)); } - //#region Check muting - - const [ - userIdsWhoMeMuting, - userMutedInstances, - ] = await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - this.cacheService.userProfileCache.fetch(me.id).then(p => new Set(p.mutedInstances)), - ]); - - notifications = (await Promise.all(notifications.map(async (notification): Promise => { - if (!('notifierId' in notification)) return notification; - if (userIdsWhoMeMuting.has(notification.notifierId)) return null; - - const notifier = await this.usersRepository.findOneBy({ id: notification.notifierId }); - if (notifier === null) return null; - if (notifier.host && userMutedInstances.has(notifier.host)) return null; - - return notification; - }))).filter((notification): notification is MiNotification => notification !== null); - - //#endregion Check muting - if (notifications.length === 0) { return []; }