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
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
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
Jonas Platte
ed100afddb
events: Add IgnoredUser::new
2022-11-14 10:36:15 +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
dd67745e4d
events: Add convenience constructors for MessageType
2022-11-11 11:06:33 +01:00
Jonas Platte
94990f60f2
events: Don't skip serializing empty content of redacted events
2022-11-09 17:11:50 +01:00
Damir Jelić
6d133971b0
events: Add support for MSC3783 in the key verification events
2022-11-09 16:45:24 +01:00
Kévin Commaille
5158dbf2eb
events: Don't include sensitive data in Debug-format of to-device events
2022-11-07 09:46:25 +01:00
Jonas Platte
d15fc3f5ec
events: Avoid unnecessary copying in reply generation
2022-11-03 13:45:21 +01:00
Jonas Platte
ae26730e29
events: Move fragment stringification out of HtmlSanitizer::clean
2022-11-03 13:45:16 +01:00
Xiretza
69c807bdc1
events: Escape plain bodies in replies
...
Replies generate an HTML body even if the reply itself only consists of
plain text. In order to convert the plain text to HTML, it has to be
escaped, which did not happen previously.
2022-11-03 13:16:01 +01:00
Jonas Platte
c7e84c5249
Fix clippy lints
...
Automated using `cargo clippy --fix`.
2022-10-26 13:38:29 +02:00
gnieto
dcff5a0737
events: Make name on SecretStorageKeyEventContent optional
...
The spec has the `name` field marked as optional.
See: https://spec.matrix.org/v1.4/client-server-api/#key-storage
2022-10-22 08:29:13 +00:00
Kévin Commaille
045861441a
doc: Update Matrix spec links to v1.4
2022-10-21 10:41:20 +02:00
Kévin Commaille
a3675e61bf
events: Add method to construct a replacement
2022-10-21 10:40:33 +02:00
Kévin Commaille
21bda6678d
events: Enable more markdown syntax
...
Enable markdown extensions that produces spec-compliant HTML.
2022-10-19 21:44:33 +02:00
Kévin Commaille
a710229d9d
events: Fix markdown content detection
...
Encoded HTML entities would be detected as a change.
Use the parsed events instead to check if markdown syntax was detected.
2022-10-19 21:44:33 +02:00
Kévin Commaille
7c0f7ba5f1
events: Make Replacement generic over the parent type
...
Because the new content must be of the same type.
2022-10-17 20:27:49 +02:00
Kévin Commaille
7c802c89ca
events: Remove conversions between extensible types and room messages
...
They are more difficult to implement and use with
generic replacements, for little gain.
2022-10-17 20:27:49 +02:00
Kévin Commaille
ec853e968a
events: Generate structs without relation for events that can be replaced
2022-10-17 20:27:49 +02:00
Kévin Commaille
b538234bce
chore: Fix new docs warnings
2022-10-12 10:31:23 +02:00
Kévin Commaille
d3bd86a23e
events: Add support for read receipts for threads
...
According to MSC3771
2022-10-10 20:49:04 +02:00
Kévin Commaille
4e2dac30be
events: Stabilize support for event replacements
2022-10-10 18:23:03 +02:00
Kévin Commaille
994136b9b8
events: Add thread-aware methods to RoomMessageEventContent
2022-10-10 17:55:08 +02:00
Kévin Commaille
003f0abebf
events: Stabilize current support for threads
2022-10-10 17:55:08 +02:00
Kévin Commaille
2bdbf49535
chore: Fix new clippy warnings
2022-10-10 17:20:58 +02:00
Kévin Commaille
c7caf65f65
events: Remove ToDevice kind on RoomEncryptedEventContent
...
There is ToDeviceRoomEncryptedEventContent.
2022-10-01 12:12:26 +02:00
Kévin Commaille
c141b7deb5
events: Stabilize support for private read receipts
2022-10-01 11:21:18 +02:00
Jonas Platte
ac707e30f0
events: Move ignored_users serde code into ignored_user_list module
...
… and optimize it.
2022-09-24 11:34:55 +02:00
Jonas Platte
028eb8a457
events: Remove deprecated API
2022-09-22 11:50:22 +02:00