Jason Volk
9c84a3be3e
state-res: fetch event_auth state events in parallel
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-12-03 23:05:10 +00:00
Jason Volk
c1f5f3f20b
optimize PL deserialization
...
add generalized map_as_vec deserializer
Signed-off-by: Jason Volk <jason@zemos.net>
2024-12-03 13:43:30 +00:00
strawberry
97e2fb6df1
state-res: fix allow knock -> leave on same state_key and sender
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-20 22:57:53 -05:00
strawberry
d1f635764e
state-res: fix incorrect knock join_rule checks
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-20 19:34:39 -05:00
strawberry
8c323cf6e6
clarify confusing knock event auth warning
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-19 19:07:47 -05:00
Charles Hall
aff5d8532f
state-res: improve tracing spans and events
...
slight modifications, mainly just restricting these to
debug log level to prevent incurring the overhead of
the instruments, and tiny adjustments for async state res
Co-authored-by: strawberry <strawberry@puppygock.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-19 19:07:42 -05:00
strawberry
cf31b8798f
add more missing unspecced r0 endpoints, fix silly upload_signatures struct
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-11-19 19:00:37 -05:00
Charles Hall
c3fb396352
state-res: improve tracing spans and events
...
* Make use of tracing's structured logging features
* Change some wording to align with the spec
2024-11-07 18:52:02 -05:00
Jason Volk
e7db44989d
async state-res
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-09-24 22:58:36 +00:00
Jason Volk
37ffec73c9
state-res: downgrade info! log messages to debug!
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-16 03:21:44 -07:00
Kévin Commaille
a8f1440698
state-res: Refactor Knock membership transition
2024-03-05 10:43:52 +01:00
Kévin Commaille
812625fab4
state-res: Disallow invite->knock membership transition
...
Due to a spec clarification that reverts the previous spec clarification
2024-02-28 10:34:52 +01:00
Jonas Platte
984cbda962
identifiers: Don't require room IDs to contain a server name
...
Room IDs being splittable into localpart and servername does not have
much inherent value and there are proposals like MSC4051¹ that propose
changing the format. Relaxing the rules makes Ruma forwards-compatible
with those proposals. The server_name accessor is kept because it is
used by at least one downstream, but is updated to return an `Option`.
¹ https://github.com/matrix-org/matrix-spec-proposals/pull/4051
2023-09-28 16:43:16 +02:00
Jonas Platte
31331f3165
Bring back ruma-events
...
Co-authored-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-08-28 10:23:54 +02:00
Kévin Commaille
afd8f2f652
state-res: Add RoomVersion::V11
...
According to MSC3820
2023-08-14 17:23:17 +02:00
Kévin Commaille
bcae4e5799
chore: Use .is_some_and(…) instead of .map_or(false, …)
2023-08-14 16:17:25 +02:00
Kévin Commaille
1701d9a803
events: Make creator field of RoomCreateEventContent optional and RedactedRoomreateEventContent a typedef
...
According to MSC2175
2023-08-14 15:33:39 +02: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
ca78825e94
events: rename RoomEventType to TimelineEventType
2023-01-03 10:36:13 +01:00
Kévin Commaille
045861441a
doc: Update Matrix spec links to v1.4
2022-10-21 10:41:20 +02:00
Kévin Commaille
279c9d0fa6
state-res: Allow invite->knock membership transition
...
According to spec clarification
2022-10-10 17:29:08 +02:00
Nyaaori
68eecf71af
state-res: Fix third party invite validation
2022-10-10 17:20:58 +02:00
Jonas Platte
66ff4dbaad
Raise MSRV to 1.62
2022-09-20 13:49:16 +02:00
Kévin Commaille
df821ab753
state-res: Enforce integer PLs for room v10 on custom types
...
According to MSC3667
2022-06-27 13:19:25 +02:00
Kévin Commaille
b38efe75c3
state-res: Fix default invite power level
...
According to matrix-org/matrix-spec#1021
2022-06-27 13:19:25 +02:00
Kévin Commaille
ef072654da
state-res: Add knock_restricted join rule
...
According to MSC3787
2022-06-25 18:22:32 +02:00
Kévin Commaille
e683d28afe
state-res: Enforce integer power levels for room v10
...
According to MSC3667
2022-06-25 18:22:32 +02:00
Kévin Commaille
324c8b09e0
state-res: Add m.federate
to the authorization rules
2022-06-25 18:11: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
Jonas Platte
6100a0fa12
Use new owned ID types in more places
2022-04-20 10:39:36 +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
Jonas Platte
3ec8218158
state-res: Update fetch_state type
2022-04-15 12:06:09 +02:00
Jonas Platte
b3cea6b998
state-res: Use StateEventType over RoomEventType where applicable
2022-04-09 00:55:14 +02:00
Jonas Platte
7de3b4b649
events: Rework the event enum hierarchy
2022-04-05 14:29:17 +02:00
Jonas Platte
d87874314b
events: Add 'Original' prefix to unredacted types with a redacted form
2022-04-05 14:29:17 +02:00
Jonas Platte
ce785064a9
Use RoomEventType instead of EventType for PDUs and power levels
2022-03-16 12:20:17 +01:00
Timo Kösters
83e46b6aea
state-res: Fix restricted joins
2022-03-14 15:02:21 +01:00
Timo Kösters
1ab97ddbe5
state-res: Fix knocking support
2022-03-11 12:38:39 +00:00
Kévin Commaille
bdcf07be87
common: Merge ruma-serde into ruma-common
2022-03-10 12:11:00 +01:00
Kévin Commaille
088d1872b7
common: Merge ruma-identifiers into ruma-common
2022-03-09 17:46:51 +00:00
gnieto
fca0f6a22b
Minor fix on join member auth rules
...
Previous code was not checking/enforcing rule 4.3.1
(https://spec.matrix.org/v1.2/rooms/v9/ ), which states that a room
member event (with a join membership) must be accepted only if it contains
a previous event which `state_key` is the room creator.
On top of that, it simplifies the public interface for `auth_rules`,
removing the need of (externally) compute `prev_event`, which, as a side
effect, should reduce the amount of times the previous event needs to be
fetched: It will only load it if the authorized event is a `m.room_member`
with a `Join` state.
Finally, I've splitted the join conditions so it's (hopefully) more
readable and apply auth rules in the same order as they
appear in the spec.
2022-03-08 08:27:47 +01:00
Kévin Commaille
c3f9a3cb70
common: Merge ruma-events into ruma-common
2022-03-04 11:45:07 +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
Jonas Platte
a55df1ef9d
state-res: Remove unstable-spec feature
...
Everything that was gated behind it was stabilized with Matrix v1.2.
2022-02-02 23:25:52 +01:00
Jonas Platte
2706f24688
state-res: Move room version 8, 9 logic from unstable-pre-spec to unstable-spec
2022-02-01 21:37:11 +01:00
Jonas Platte
3ed7c8a643
state-res: Move knocking logic out of unstable-pre-spec
2022-02-01 21:08:19 +01:00
Jonas Platte
4c859c5aeb
Introduce a Base64 type and use it where applicable
2022-01-13 16:22:21 +01:00
Jonas Platte
1bdeebbd00
state-res: Reduce indentation by adding early returns
2022-01-13 13:52:43 +01:00