summary refs log tree commit diff
path: root/rust/benches/evaluator.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Stabilize support for MSC3966: event_property_contains push condition. (#15187)Patrick Cloke2023-03-071-4/+0
| | | | This removes the configuration flag & updates the identifiers to use the stable version.
* Stabilize support for MSC3758: event_property_is push condition (#15185)Patrick Cloke2023-03-061-4/+0
| | | | This removes the configuration flag & updates the identifiers to use the stable version.
* Use nightly rustfmt in CI (#15188)Erik Johnston2023-03-031-0/+1
| | | | As we use some nightly only options, e.g. to group and sort imports consistently.
* Update intentional mentions (MSC3952) to depend on ↵Patrick Cloke2023-03-021-4/+0
| | | | | | | `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-6/+3
| | | | | | | | | | | | | | | | | | | | 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-4/+0
| | | | | | | | | | (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.
* Implement MSC3966: Add a push rule condition to search for a value in an ↵Patrick Cloke2023-02-141-14/+18
| | | | | | array. (#15045) The `exact_event_property_contains` condition can be used to search for a value inside of an array.
* Support for MSC3758: exact_event_match push condition (#14964)Patrick Cloke2023-02-101-12/+53
| | | | | This specifies to search for an exact value match, instead of string globbing. It only works across non-compound JSON values (null, boolean, integer, and strings).
* Implement MSC3958: suppress notifications from edits (#14960)Patrick Cloke2023-02-031-0/+1
| | | | | | | | 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
* Support the backwards compatibility features in MSC3952. (#14958)Patrick Cloke2023-02-031-0/+4
| | | | If the feature is enabled and the event has a `m.mentions` property, skip processing of the legacy mentions rules.
* Fix running cargo bench & test in CI. (#14943)Patrick Cloke2023-01-311-0/+10
|
* Implement MSC3930: polls push rules (#14787)Andrew Morgan2023-01-191-2/+7
|
* Fix Rust lint CI (#14602)Erik Johnston2022-12-021-4/+12
|
* Implement push rule evaluation in Rust. (#13838)Erik Johnston2022-09-291-0/+149