58 Commits

Author SHA1 Message Date
Jason Volk
8cfc0a6bc6 fix missing pushrules in test
Signed-off-by: Jason Volk <jason@zemos.net>
2025-02-05 10:17:16 +00:00
Jason Volk
b560338b2a reduce several tracing spans to debug level
Signed-off-by: Jason Volk <jason@zemos.net>
2025-01-23 04:36:37 +00:00
strawberry
a204cb56db
remove stupid skip_serializing_if on push rulesets
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-12-15 15:13:13 -05:00
Kévin Commaille
b1790e05ce push: Allow to add custom data for pushers
Due to a clarification in the spec.
2024-12-15 03:10:09 -05:00
strawberry
39c1addd37
implement MSC4210, add missing .m.rule.contains_user_name check
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-26 15:55:42 -04:00
Kévin Commaille
b7829d5607 Fix test 2023-12-26 17:28:43 +01:00
Kévin Commaille
00f8a6743b push: Allow to deserialize Ruleset with missing fields
According to the Matrix Specification, no field is required.
2023-12-26 17:28:43 +01:00
Kévin Commaille
90d3605b87 push: Make power levels optional in PushConditionRoomCtx 2023-12-03 13:03:06 +01:00
Kévin Commaille
9b07772d1a push: Allow to deserialize (New)ConditionalPushRule without conditions 2023-11-15 15:10:42 +01:00
Kévin Commaille
bcae4e5799 chore: Use .is_some_and(…) instead of .map_or(false, …) 2023-08-14 16:17:25 +02:00
Jonas Platte
ffc271f3ec
push: Re-export ScalarJsonValue
It was part of the public interface already, but not nameable.
2023-07-19 13:58:35 +02:00
Jonas Platte
c5782ab8aa
Use new owned ID macros throught the codebase 2023-06-20 11:47:50 +02:00
Jonas Platte
ba5bf8cfce
Replace assert_matches by assert_matches2 2023-06-08 11:37:11 +02:00
Kévin Commaille
766fba75f9 push: Add support for intentional mentions push rules
According to MSC3952
2023-05-26 14:39:58 +02:00
Kévin Commaille
6a77b4c9e4 push: Remove the DontNotify and Coalesce variants of push::Action
According to MSC3987.
2023-05-04 13:44:54 +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
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
f159776f52 chore: Make all applicable spec links use the latest spec instead of a specific version 2023-02-12 12:39:24 +01:00
Jonas Platte
b859d9c8b0
common: Derive Debug via StringEnum derive 2023-01-13 13:49:59 +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
05356d7d4e push: Add method to change the actions of push rules in a Ruleset 2022-11-09 14:45:12 +01:00
Kévin Commaille
96642e3a1b push: Add method to change the enabled state of push rules in a Ruleset 2022-11-09 14:45:12 +01:00
Kévin Commaille
f87714d73f push: Add method to insert a user push rule in a Ruleset 2022-11-09 14:45:12 +01:00
Kévin Commaille
a50f5f5cb2 push: Add method to get a push rule in a Ruleset 2022-11-09 14:45:12 +01:00
Kévin Commaille
aa2e905ce3 client-api: Use an enum to construct set_pushrule's Request 2022-11-09 14:45:12 +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
cb122e755c push: Move RuleKind to ruma-common 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
Kévin Commaille
2bd5c131f4 client-api: Make PusherKind contain the pusher data
Since it depends on the kind
2022-11-07 10:21:48 +01:00
Kévin Commaille
045861441a doc: Update Matrix spec links to v1.4 2022-10-21 10:41:20 +02:00
Jonas Platte
1291929131
Rename unstable-pre-spec to unstable-unspecified 2022-09-20 10:39:20 +02:00
Kévin Commaille
085dc435fa push: Split test assertions 2022-06-07 12:07:57 +02:00
Kévin Commaille
240c8bc4b8 macros: Derive as_str() for types that derive StringEnum 2022-05-30 17:17:06 +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
Kévin Commaille
688d5bf47a
docs: Improve string enums documentation
Mention the conversion from string.
2022-04-10 14:48:09 +02:00
Jonas Platte
26aea3a084
common: Consistently use int macros for tests 2022-04-04 16:54:17 +02: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
homersimpsons
2ec50bd03c
doc: migrate links from matrix-doc to matrix-spec(-proposals) 2022-03-08 10:24:26 +01: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
Jonas Platte
510b8485d8
common: Remove more unnecessary bounds 2022-02-12 01:47:32 +01:00
Jonas Platte
932fe4fa38
common: Skip serializing empty default_payload in PusherData, simplify type 2022-02-09 18:47:24 +01:00
Jonas Platte
ee977b48f0
Make the inner type of _Custom enum variants unusable
The variant itself would be private if possible, this is the solution
closest to that.
2022-01-13 11:38:48 +01:00
Jonas Platte
3ce578f384
identifiers: Make UserId a DST 2021-11-26 00:40:40 +01:00
Jonas Platte
2d4dbfe42f
identifiers: Make RoomId a DST 2021-11-26 00:04:28 +01:00