summary refs log tree commit diff
path: root/rust/src/push/base_rules.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Stabilize support for MSC3758: event_property_is push condition (#15185)Patrick Cloke2023-03-061-4/+4
| | | | This removes the configuration flag & updates the identifiers to use the stable version.
* Update intentional mentions (MSC3952) to depend on ↵Patrick Cloke2023-03-021-2/+7
| | | | | | | `exact_event_property_contains` (MSC3966). (#15051) This replaces the specific `is_user_mention` push rule condition used in MSC3952 with the generic `exact_event_property_contains` push rule condition from MSC3966.
* Do not accept pattern_type from user input in push rules. (#15088)Patrick Cloke2023-02-281-87/+48
| | | | | | | | | | | | | | | | | | | | Internally the push rules module uses a `pattern_type` property for `event_match` conditions (and `related_event_match`) to mark the condition as matching the current user's Matrix ID or localpart. This is leaky to the Client-Server API where a user can successfully set a condition which provides `pattern_type` instead of `pattern` (note that there's no benefit to doing this -- the user can just use their own Matrix ID or localpart instead). When serializing back to the client the `pattern_type` property is converted into a proper `pattern`. The following changes are made to avoid this: * Separate the `KnownCondition::EventMatch` enum value into `EventMatch` and `EventMatchType`, each with their own expected properties. (Note that a similar change is made for `RelatedEventMatch`.) * Make it such that the `pattern_type` variants serialize to the same condition kind, but cannot be deserialized (since they're only provided by base rules). * As a final tweak, convert `user_id` vs. `user_localpart` values into an enum.
* Update intentional mentions (MSC3952) to depend on `exact_event_match` ↵Patrick Cloke2023-02-161-2/+5
| | | | | | | | | | (MSC3758). (#15037) This replaces the specific `is_room_mention` push rule condition used in MSC3952 with the generic `exact_event_match` push rule condition from MSC3758. No functionality changes due to this.
* Remove spurious `dont_notify` action from `.m.rule.reaction` (#15073)Richard van der Hoff2023-02-141-1/+1
| | | This does nothing and I want to remove it from the MSC.
* Include no actions instead of dont_notify for suppressing edits. (#15016)Patrick Cloke2023-02-071-1/+1
|
* Implement MSC3958: suppress notifications from edits (#14960)Patrick Cloke2023-02-031-0/+17
| | | | | | | | Co-authored-by: Brad Murray <brad@beeper.com> Co-authored-by: Nick Barrett <nick@beeper.com> Copy the suppress_edits push rule from Beeper to implement MSC3958. https://github.com/beeper/synapse/blame/9415a1284b1bfb558bd66f28c24ca1611e6c6fa2/rust/src/push/base_rules.rs#L98-L114
* Fix inconsistencies between MSC3952 and implementation. (#14957)Patrick Cloke2023-02-011-3/+3
| | | | * Correct the push rule IDs. * Removes the sound tweak for room notifications.
* Implement MSC3952: Intentional mentions (#14823)Patrick Cloke2023-01-271-0/+21
| | | | | | | | MSC3952 defines push rules which searches for mentions in a list of Matrix IDs in the event body, instead of searching the entire event body for display name / local part. This is implemented behind an experimental configuration flag and does not yet implement the backwards compatibility pieces of the MSC.
* Implement MSC3930: polls push rules (#14787)Andrew Morgan2023-01-191-1/+77
|
* Support MSC1767's `content.body` behaviour; Add base rules from MSC3933 (#14524)Travis Ralston2022-11-281-0/+270
| | | | | | | | | | | * Support MSC1767's `content.body` behaviour in push rules * Add the base rules from MSC3933 * Changelog entry * Flip condition around for finding `m.markup` * Remove forgotten import
* Implementation for MSC3664: Pushrules for relations (#11804)DeepBlueV7.X2022-10-251-0/+17
|
* Remove the experimental implementation of MSC3772. (#14094)Patrick Cloke2022-10-121-13/+0
| | | MSC3772 has been abandoned.
* Disable pushing for server ACL events (MSC3786). (#13997)Patrick Cloke2022-10-041-1/+1
| | | | | | Switches to the stable identifier for MSC3786 and enables it by default. This disables pushes of m.room.server_acl events.
* Implement push rule evaluation in Rust. (#13838)Erik Johnston2022-09-291-0/+1
|
* Port the push rule classes to Rust. (#13768)Erik Johnston2022-09-201-0/+335