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
Michael Telatynski 2023-07-24 18:29:04 +01:00 committed by GitHub
parent a70fcfd0bc
commit d268cc1b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -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);