Fix bug in getNotiType

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-03-15 11:26:22 +05:30
parent 31ac1cd864
commit 807c240f22

View file

@ -69,9 +69,9 @@ class Notifications extends EventEmitter {
const mx = this.matrixClient; const mx = this.matrixClient;
const pushRule = mx.getRoomPushRule('global', roomId); const pushRule = mx.getRoomPushRule('global', roomId);
if (typeof pushRule === 'undefined') { if (pushRule === undefined) {
const overridePushRules = mx.getAccountData('m.push_rules')?.getContent()?.global?.override; 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) => ( const isMuteOverride = overridePushRules.find((rule) => (
rule.rule_id === roomId rule.rule_id === roomId