mirror of https://github.com/vector-im/riot-web
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.pull/28217/head
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);
|
||||
|
|
Loading…
Reference in New Issue