From 807c240f22cef089f75753b045c3e5410a1e5bde Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Tue, 15 Mar 2022 11:26:22 +0530 Subject: [PATCH] Fix bug in getNotiType Signed-off-by: Ajay Bura --- src/client/state/Notifications.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/state/Notifications.js b/src/client/state/Notifications.js index 9df98242..bf45f576 100644 --- a/src/client/state/Notifications.js +++ b/src/client/state/Notifications.js @@ -69,9 +69,9 @@ class Notifications extends EventEmitter { const mx = this.matrixClient; const pushRule = mx.getRoomPushRule('global', roomId); - if (typeof pushRule === 'undefined') { + if (pushRule === undefined) { const overridePushRules = mx.getAccountData('m.push_rules')?.getContent()?.global?.override; - if (typeof overridePushRules === 'undefined') return 0; + if (overridePushRules === undefined) return cons.notifs.DEFAULT; const isMuteOverride = overridePushRules.find((rule) => ( rule.rule_id === roomId