Iterate PR, merge types with @types/PushRules
This commit is contained in:
parent
cd1b315ed6
commit
d90321d813
4 changed files with 14 additions and 13 deletions
|
@ -20,7 +20,8 @@ import { MatrixClientPeg } from '../../MatrixClientPeg';
|
|||
import { SettingLevel } from "../SettingLevel";
|
||||
|
||||
// XXX: This feels wrong.
|
||||
import { Action, PushProcessor } from "matrix-js-sdk/src/pushprocessor";
|
||||
import { PushProcessor } from "matrix-js-sdk/src/pushprocessor";
|
||||
import { PushRuleActionName } from "matrix-js-sdk/src/@types/PushRules";
|
||||
|
||||
// .m.rule.master being enabled means all events match that push rule
|
||||
// default action on this rule is dont_notify, but it could be something else
|
||||
|
@ -35,7 +36,7 @@ export function isPushNotifyDisabled(): boolean {
|
|||
}
|
||||
|
||||
// If the rule is enabled then check it does not notify on everything
|
||||
return masterRule.enabled && !masterRule.actions.includes(Action.Notify);
|
||||
return masterRule.enabled && !masterRule.actions.includes(PushRuleActionName.Notify);
|
||||
}
|
||||
|
||||
function getNotifier(): any { // TODO: [TS] Formal type that doesn't cause a cyclical reference.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue