64 Commits

Author SHA1 Message Date
Kévin Commaille
2ccc0323f6 push: Add support for event_property_contains push condition
According to MSC3966
2023-04-11 16:12:05 +02:00
Kévin Commaille
2e7b67bb23 push: Add support for event_property_is push condition
According to MSC3758
2023-04-11 16:12:05 +02:00
Kévin Commaille
82b4257bfe push: Split push conditions tests 2023-04-11 16:12:05 +02:00
Kévin Commaille
33fa1b48ed push: Collect a bigger subset of JSON values in FlattenedJson 2023-04-11 16:12:05 +02:00
Kévin Commaille
cdfcdecaf8 push: Move FlattenedJson to its own module 2023-04-11 16:12:05 +02:00
Kévin Commaille
ef374ea6b0 push: Escape dots and backslashes in field name for event_match condition
According to MSC3873
2023-04-11 11:18:20 +02:00
Kévin Commaille
8eea3e0549 push: Enable by default .m.rule.tombstone push rule
As defined in the spec.
2023-03-14 12:01:40 +01:00
Kévin Commaille
a399a4017a
push: Add convenience methods to check if an action triggers a notification or a sound 2023-03-13 13:54:22 +01:00
Kévin Commaille
b6717bc2ea
push: Add convenience method to check if an action is a highlight tweak 2023-03-13 13:36:56 +01:00
Kévin Commaille
ba296ec466 push: Add method to remove a user-defined push rule from a Ruleset 2023-03-02 11:30:48 +01:00
Kévin Commaille
a78d2a7dcf push: Add method to update server-default push rules 2023-03-02 11:30:48 +01:00
Kévin Commaille
c44e0b5e5a push: Fix ordering of docs 2023-03-02 11:30:48 +01:00
Kévin Commaille
a859567487 docs: Migrate spec links to v1.6 2023-02-15 09:59:05 +01:00
Kévin Commaille
9d8784ee9a push: Move .m.rule.roomnotif push rule before .m.rule.tombstone
According to a spec clarification in Matrix 1.6
2023-02-14 22:05:13 +01:00
Kévin Commaille
e653912e22 xtask: Disallow linking to the latest spec when a link uses a non-unique ID
These IDs can change from one version to the other if another heading
with the same name is added before, so the link would not
point to the proper part of the spec anymore.
2023-02-12 12:39:24 +01:00
Kévin Commaille
f159776f52 chore: Make all applicable spec links use the latest spec instead of a specific version 2023-02-12 12:39:24 +01:00
Kévin Commaille
e58b9fcd92 tests: Remove unnecessary borrows 2023-02-06 19:11:06 +01:00
Jonas Platte
b859d9c8b0
common: Derive Debug via StringEnum derive 2023-01-13 13:49:59 +01:00
Kévin Commaille
12e4aa47b6 push: Allow to deserialize Action with custom value 2023-01-07 14:36:25 +01:00
Kévin Commaille
97fd0c3419 push: Allow to deserialize PushCondition with unknown kind 2023-01-07 14:36:25 +01:00
Benjamin Kampmann
9460702b00 feat: add support for unstable-msc3931/3932 style push conditions parsing 2023-01-07 14:36:25 +01:00
Kévin Commaille
e8bec10c6d push: Make SimplePushRule generic over the type of the rule_id 2022-11-12 10:59:52 +01:00
Kévin Commaille
c5fb935472 macros: Add .m.rule.snake_case rename rule for StringEnum 2022-11-12 09:55:57 +01:00
Kévin Commaille
b2d52680af push: Remove Ruleset::add()
In practice, rule insertion is more complex than
adding rules at the end of the ruleset. It can be
easily replaced by using the methods of IndexSet.
2022-11-09 14:45:12 +01:00
Kévin Commaille
bf7c504446 push: Add enums for predefined push rule IDs 2022-11-09 14:45:12 +01:00
Jonas Platte
c7e84c5249
Fix clippy lints
Automated using `cargo clippy --fix`.
2022-10-26 13:38:29 +02:00
Kévin Commaille
045861441a doc: Update Matrix spec links to v1.4 2022-10-21 10:41:20 +02:00
Kévin Commaille
5b25f2f223 push-rule: Stabilize default room server ACL push rule 2022-09-30 19:42:06 +02:00
Jonas Platte
4fb051ba0f Use Default derive for enums 2022-09-20 13:49:16 +02:00
Kévin Commaille
2f96fa5548 push: Add push rule to ignore room server ACLs
According to MSC3786
2022-07-16 19:09:15 +02:00
Kévin Commaille
c63f03912b push: Set feature flag per rule instead of per set.
Allows more flexibility when several feature flags change the same set.
2022-07-16 19:09:15 +02:00
Kévin Commaille
506a7bdf2e push: Fix regex for word boundaries 2022-06-24 17:32:34 +02:00
Kévin Commaille
1e220a05bf push: Fix word matching without wildcards
Don't match non-ASCII alphanumeric characters
2022-06-24 17:32:34 +02:00
Kévin Commaille
d192184b3c
push: Allow wildcards when matching words 2022-06-23 15:57:54 +02:00
Kévin Commaille
085dc435fa push: Split test assertions 2022-06-07 12:07:57 +02:00
Jonas Platte
8912182c56
Increase usage of implicit named arguments in format strings 2022-06-03 10:06:28 +02:00
Jonas Platte
5f902851af
Upgrade to Rust 2021 2022-05-27 12:04:23 +02:00
Kévin Commaille
c3d573e943
events: Add support for polls
According to MSC3381
2022-05-25 12:03:45 +02:00
Jonas Platte
e50d59f7a4
Split up some test assertions 2022-05-25 09:08:48 +02:00
Jonas Platte
b34bfaf1f6
Replace matches crate with assert_matches 2022-05-24 18:07:29 +02:00
Jonas Platte
6a2950884d push: Consider push rules to not apply to events sent by the user themselves 2022-05-12 12:17:55 +02:00
Jonas Platte
d855ec33d6 identifiers: Update ToOwned implementations to use new types
… and a lot of changes that cascaded from that.
2022-04-20 10:39:36 +02:00
Jakub Kubík
09ac0aa3ac
fix: Correct rule IDs in predefined Rulesets 2022-04-17 22:58:19 +02:00
Jonas Platte
26aea3a084
common: Consistently use int macros for tests 2022-04-04 16:54:17 +02:00
Kévin Commaille
e2375ed72e xtask: Add typos check 2022-03-18 14:29:57 +01:00
Kévin Commaille
bdcf07be87
common: Merge ruma-serde into ruma-common 2022-03-10 12:11:00 +01:00
Jonas Platte
1bce0f0c96
common: Instrument push condition matching 2022-03-09 19:21:28 +01:00
Kévin Commaille
088d1872b7
common: Merge ruma-identifiers into ruma-common 2022-03-09 17:46:51 +00:00
Jonathan de Jong
936bb64e84
Update links to spec.matrix.org/v1.2 2022-02-18 19:45:04 +01:00
Jonas Platte
215cb35806
Clean up import grouping / ordering 2022-02-18 11:20:39 +01:00