From d268cc1b752cce6a11a60c2c112fad8f14d2dc43 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 24 Jul 2023 18:29:04 +0100 Subject: [PATCH] Fix spurious "Your server isn't responding to some requests" (#11306) When changing room notification settings This happened due to a race condition between adding a push rule and enabling it, the latter being superfluous given the spec says > When creating push rules, they MUST be enabled by default. --- src/RoomNotifs.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/RoomNotifs.ts b/src/RoomNotifs.ts index c1f94cd71c..543704f8b3 100644 --- a/src/RoomNotifs.ts +++ b/src/RoomNotifs.ts @@ -152,8 +152,6 @@ function setRoomNotifsStateUnmuted(cli: MatrixClient, roomId: string, newState: actions: [PushRuleActionName.DontNotify], }), ); - // https://matrix.org/jira/browse/SPEC-400 - promises.push(cli.setPushRuleEnabled("global", PushRuleKind.RoomSpecific, roomId, true)); } else if (newState === RoomNotifState.AllMessagesLoud) { promises.push( cli.addPushRule("global", PushRuleKind.RoomSpecific, roomId, { @@ -166,8 +164,6 @@ function setRoomNotifsStateUnmuted(cli: MatrixClient, roomId: string, newState: ], }), ); - // https://matrix.org/jira/browse/SPEC-400 - promises.push(cli.setPushRuleEnabled("global", PushRuleKind.RoomSpecific, roomId, true)); } return Promise.all(promises);