Consider the empty push rule actions array equiv to deprecated dont_notify (#11155)
* Consider the empty push rule actions array equiv to deprecated dont_notify * Switch primary tests to empty actions, add test for dont_notify * strict types
This commit is contained in:
@@ -64,6 +64,13 @@ describe("RoomNotifs test", () => {
|
||||
expect(getRoomNotifsState(client, room.roomId)).toBe(RoomNotifState.Mute);
|
||||
});
|
||||
|
||||
it("getRoomNotifsState handles mute state for legacy DontNotify action", () => {
|
||||
const room = mkRoom(client, "!roomId:server");
|
||||
muteRoom(room);
|
||||
client.pushRules!.global.override![0]!.actions = [PushRuleActionName.DontNotify];
|
||||
expect(getRoomNotifsState(client, room.roomId)).toBe(RoomNotifState.Mute);
|
||||
});
|
||||
|
||||
it("getRoomNotifsState handles mentions only", () => {
|
||||
(client as any).getRoomPushRule = () => ({
|
||||
rule_id: "!roomId:server",
|
||||
|
||||
Reference in New Issue
Block a user