You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-09 08:42:50 +03:00
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.
This commit is contained in:
committed by
GitHub
parent
a70fcfd0bc
commit
d268cc1b75
@@ -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);
|
||||
|
Reference in New Issue
Block a user