Apply code review suggestions - use explicit null checks
Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
parent
4762dfd5c7
commit
50bbc71098
|
|
@ -109,7 +109,7 @@ export class NotificationService implements OnApplicationShutdown {
|
|||
|
||||
const mutings = await this.cacheService.userMutingsCache.fetch(notifieeId);
|
||||
const muting = mutings.get(notifierId);
|
||||
if (muting && muting.mutingType === 'all') {
|
||||
if (muting != null && muting.mutingType === 'all') {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ export class NotificationEntityService implements OnModuleInit {
|
|||
): boolean {
|
||||
if (!('notifierId' in notification)) return true;
|
||||
const muting = userIdsWhoMeMutingMap.get(notification.notifierId);
|
||||
if (muting && muting.mutingType === 'all') return false;
|
||||
if (muting != null && muting.mutingType === 'all') return false;
|
||||
|
||||
const notifier = notifiers.find(x => x.id === notification.notifierId) ?? null;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue