Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
tai-cha committed Feb 28, 2024
1 parent 01d67e8 commit ff9df0d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@ export class NotificationEntityService implements OnModuleInit {
/**
* notifierが存在するか、ミュートされていないか、サスペンドされていないかを確認するvalidator
*/
async #validateNotifier <T extends MiNotification | MiGroupedNotification> (
#validateNotifier <T extends MiNotification | MiGroupedNotification> (
notification: T,
userIdsWhoMeMuting: Set<MiUser['id']>,
userMutedInstances: Set<string>,
notifiers: MiUser[],
): Promise<boolean> {
): boolean {
if (!('notifierId' in notification)) return true;
if (userIdsWhoMeMuting.has(notification.notifierId)) return false;

Expand Down Expand Up @@ -311,7 +311,7 @@ export class NotificationEntityService implements OnModuleInit {
}) : [];

const filteredNotifications = ((await Promise.all(notifications.map(async (notification) => {
const isValid = await this.#validateNotifier(notification, userIdsWhoMeMuting, userMutedInstances, notifiers);
const isValid = this.#validateNotifier(notification, userIdsWhoMeMuting, userMutedInstances, notifiers);
return isValid ? notification : null;
}))) as [T | null] ).filter(isNotNull);

Expand Down

0 comments on commit ff9df0d

Please sign in to comment.