Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit d268cc1

Browse files
authored
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.
1 parent a70fcfd commit d268cc1

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/RoomNotifs.ts

-4
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ function setRoomNotifsStateUnmuted(cli: MatrixClient, roomId: string, newState:
152152
actions: [PushRuleActionName.DontNotify],
153153
}),
154154
);
155-
// https://matrix.org/jira/browse/SPEC-400
156-
promises.push(cli.setPushRuleEnabled("global", PushRuleKind.RoomSpecific, roomId, true));
157155
} else if (newState === RoomNotifState.AllMessagesLoud) {
158156
promises.push(
159157
cli.addPushRule("global", PushRuleKind.RoomSpecific, roomId, {
@@ -166,8 +164,6 @@ function setRoomNotifsStateUnmuted(cli: MatrixClient, roomId: string, newState:
166164
],
167165
}),
168166
);
169-
// https://matrix.org/jira/browse/SPEC-400
170-
promises.push(cli.setPushRuleEnabled("global", PushRuleKind.RoomSpecific, roomId, true));
171167
}
172168

173169
return Promise.all(promises);

0 commit comments

Comments
 (0)