Fix pushrule evals relying on non-option RoomPowerLevels.

Add option to bypass pushrules to send everything to pushers.

Improve robustness of pushrule eval loops.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-11-05 23:43:46 +00:00
parent ff0e007c45
commit 5051da493a
5 changed files with 112 additions and 79 deletions

View File

@@ -1308,7 +1308,8 @@ pub struct Config {
/// purposes such as recovering/recreating your admin room, or inviting
/// yourself back.
///
/// See https://tuwunel.chat/troubleshooting.html#lost-access-to-admin-room for other ways to get back into your admin room.
/// See https://tuwunel.chat/troubleshooting.html#lost-access-to-admin-room
/// for other ways to get back into your admin room.
///
/// Once this password is unset, all sessions will be logged out for
/// security purposes.
@@ -1322,6 +1323,19 @@ pub struct Config {
#[serde(default = "default_notification_push_path")]
pub notification_push_path: String,
/// For compatibility and special purpose use only. Setting this option to
/// true will not filter messages sent to pushers based on rules or actions.
/// Everything will be sent to the pusher. This option is offered for
/// several reasons, but should not be necessary:
/// - Bypass to workaround bugs or outdated server-side ruleset support.
/// - Allow clients to evaluate pushrules themselves (due to the above).
/// - Hosting or companies which have custom pushers and internal needs.
///
/// Note that setting this option to true will not affect the record of
/// notifications found in the notifications pane.
#[serde(default)]
pub push_everything: bool,
/// Allow local (your server only) presence updates/requests.
///
/// Note that presence on tuwunel is very fast unlike Synapse's. If using