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:
parent
a70fcfd0bc
commit
d268cc1b75
1 changed files with 0 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue