556 Commits

Author SHA1 Message Date
Kévin Commaille
e6c995ef1a events: Implement membership_change on [Redacted]RoomMemberEventContent 2022-12-21 11:08:16 +01:00
Flix
cf68a4676d
events: Make deserialize_relation public 2022-12-20 16:03:01 +01:00
Jonas Platte
8187556686 Add back test for slightly malformed base64 decoding 2022-12-20 15:34:50 +01:00
Jonas Platte
536341ca7e Upgrade base64 to 0.20 2022-12-20 15:34:50 +01:00
Kévin Commaille
e4678284ca events: Add accessor for AnyFullStateEventContent's event type 2022-12-20 10:46:34 +01:00
Kévin Commaille
baaf73adbc
events: Add accessors for state events' original or redacted content 2022-12-19 13:13:12 +00:00
Jonas Platte
284b797e05
Add optional redacted_because insertion to redaction 2022-12-19 12:52:15 +01:00
Jonas Platte
4f821d39ce
Export UnsignedRoomRedactionEvent from events module 2022-12-19 10:52:29 +01:00
Jonas Platte
ba9634f5bf
Update redact to take ownership of the event to be redacted 2022-12-19 10:42:27 +01:00
Kévin Commaille
fc0b29068f events: Better fix for typo in docs 2022-12-17 16:37:36 +01:00
Kévin Commaille
e541ce042c events: Fix typo in docs 2022-12-17 12:03:17 +01:00
Jonas Platte
1c9e0e7718
Allow room_types in directory::Filter to be null with the compat feature 2022-12-16 09:56:18 +01:00
Jonas Platte
5ff113a286 events: Remove unnecessary Box around Raw 2022-12-15 16:46:12 +01:00
Jonas Platte
d20f42617c events: Box optional bundled relations
These fields are much more commonly None than Some(_).
2022-12-15 16:46:12 +01:00
Jonas Platte
190205cfb1 events: Remove Option around BundledRelations
… because the type has its own empty state (all fields being None).
2022-12-15 16:46:12 +01:00
Jonas Platte
2aef89cf24 events: Add missing serde attributes to BundledRelations fields 2022-12-15 16:46:12 +01:00
Jonas Platte
2b69afeba7
events: Create new type for redaction event inside redacted_because
This new types will deserialize fine regardless of whether the redaction
event is itself redacted or not.
2022-12-15 15:06:04 +01:00
Jonas Platte
ad3c27d927
events: Make redacted_because non-optional in RedactedUnsigned 2022-12-15 12:47:27 +01:00
Jonas Platte
67cc8e9e9c Box rarely-used variants to reduce enum stack size 2022-12-15 11:46:30 +01:00
Jonas Platte
a22033413d
events: Fix serialization of custom restricted join allow rules 2022-12-15 11:19:16 +01:00
Jonas Platte
cdabe8e52d events: Remove Serialize impls for all event types except ToDeviceEvent 2022-12-15 10:41:30 +01:00
Kévin Commaille
80733a8cee events: Fix matching of rejected and revoked invitation 2022-12-14 16:21:38 +01:00
Kévin Commaille
687a534b38 events: Add MembershipChange::InvitationAccepted 2022-12-14 16:21:38 +01:00
Jonas Platte
675e6f43cd
events: Remove the Redact trait
It has not proven to be useful, being used by no downstream project.
2022-12-14 12:49:15 +01:00
Jonas Platte
a5c5b0b137
Make clippy happy 2022-12-09 11:45:04 +01:00
Jonas Platte
3211fccab0
Remove borrowing in requests 2022-11-28 14:02:35 +01:00
Kévin Commaille
61a9d65b71 events: Rename events::relation::Relations to BundledRelations 2022-11-25 22:33:37 +01:00
Kévin Commaille
80056c8a35 events: Add serialization test for reaction 2022-11-25 22:33:37 +01:00
Kévin Commaille
5faff343a0 events: Use Reference instead of events::poll::ReferenceRelation 2022-11-25 22:33:37 +01:00
Kévin Commaille
93bc8a60be events: Use Reference instead of events:🔑:verification::Relation 2022-11-25 22:33:37 +01:00
Kévin Commaille
e63896b916 events: Use Annotation instead of events::reaction::Relation 2022-11-25 22:33:37 +01:00
Kévin Commaille
6648954bd2 events: Move common relation structs under events::room::encrypted to events::relation 2022-11-25 22:33:37 +01:00
Kévin Commaille
aeaa4af776 events: Move relations under events::room::message to events::relation 2022-11-25 22:33:37 +01:00
Kévin Commaille
74161014be events: Add support for formatted body on KeyVerificationRequestEventContent 2022-11-25 20:19:52 +01:00
Kévin Commaille
583ee2cdfa events: Add support for bundled reference relations
According to MSC3267 / Matrix 1.5
2022-11-25 20:11:33 +01:00
Kévin Commaille
1ecd7effc0
events: Add tests for serde of encrypted relations 2022-11-25 18:51:12 +01:00
Kévin Commaille
03230013d9
events: Add constructor for events::room::encrypted::Replacement 2022-11-25 18:40:19 +01:00
Kévin Commaille
dc18b12506
events: Fix deserialization without relation 2022-11-25 18:40:19 +01:00
Kévin Commaille
0feb39298a api: Add support for Matrix v1.5 2022-11-25 14:13:56 +01:00
Jonas Platte
0a56dfb46e
common: Derive Default for (Incoming)RoomNetwork 2022-11-14 14:24:38 +01:00
Jonas Platte
ed100afddb
events: Add IgnoredUser::new 2022-11-14 10:36:15 +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
Jonas Platte
ae3394a6df api: Turn metadata name and description fields into docstrings 2022-11-12 10:17:24 +01:00
Jonas Platte
bdb5950fe4 macros: Remove ruma_api! macro 2022-11-12 10:17:24 +01:00
Jonas Platte
80c060cb69 Remove usage of ruma_api! 2022-11-12 10:17:24 +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
eecae05721
events: Change IgnoredUserListEventContent to use a map of empty structs 2022-11-11 21:48:14 +01:00
Jonas Platte
2500e8f8fa api: Make query_string parameter of make_endpoint_url non-optional
When Some(_), the argument would often be an empty string. By always
using the empty string to mean "no query", we avoid trailing a `?` on
URLs without having two parameter values that mean the same thing.
2022-11-11 11:27:07 +01:00
Jonas Platte
dd67745e4d events: Add convenience constructors for MessageType 2022-11-11 11:06:33 +01:00
Jonas Platte
a8ba82d585 api: Make EndpointError construction infallible
Simplifies error matching and preserves more information for
non-spec-compliant server errors.
2022-11-10 13:10:57 +01:00