54 Commits

Author SHA1 Message Date
Jonas Platte
7de3b4b649
events: Rework the event enum hierarchy 2022-04-05 14:29:17 +02:00
Jonas Platte
f540bbbc99
events: Remove some accessor functions
They will no longer make sense with the new 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
26aea3a084
common: Consistently use int macros for tests 2022-04-04 16:54:17 +02:00
Jonas Platte
abcaa4d3f7 events: Remove unnecessary duplication from trybuild testcase 2022-04-02 20:31:37 +02:00
Jonas Platte
ff700c7f1a events: Delete duplicated trybuild test invocation 2022-04-02 20:31:37 +02:00
Jonas Platte
5ec3ad2290
events: Reintroduce *EventContent as trait aliases 2022-03-31 18:42:27 +02:00
Jonas Platte
24bd27a3a9 Remove origin field from PDUs
It has been removed from the spec, for details see
https://github.com/matrix-org/matrix-spec/pull/998
2022-03-30 08:44:40 +02:00
Kévin Commaille
47bb788dc2 events: Rename ZoomLevel::value to get 2022-03-28 19:39:18 +02:00
Kévin Commaille
f3b2b7bce3 events: Rename Amplitude::value to get 2022-03-28 19:39:18 +02:00
Kévin Commaille
aba6328d1c events: Add support for transitional extensible location messages
According to MSC3488
2022-03-28 17:37:04 +02:00
Kévin Commaille
c6d11c78a7 events: Add support for transitional extensible voice messages
According to MSC3245
2022-03-28 17:37:04 +02:00
Kévin Commaille
f3abeed5c1 events: Add support for transitional extensible audio messages
According to MSC3246
2022-03-28 17:37:04 +02:00
Kévin Commaille
33108d22bc events: Add support for transitional extensible video messages
According to MSC3553
2022-03-28 17:37:04 +02:00
Kévin Commaille
f2d35f217c events: Add support for transitional extensible sticker messages
According to MSC3552
2022-03-28 17:37:04 +02:00
Kévin Commaille
e94a8db7f4 events: Add support for transitional extensible image messages
According to MSC3552
2022-03-28 17:37:04 +02:00
Kévin Commaille
8673d0d3f6 events: Add support for transitional extensible file messages
According to MSC3551
2022-03-28 17:37:04 +02:00
Jonas Platte
ee029901d7
events: Spell out 'source' (don't use 'src' abbreviation) 2022-03-28 13:22:37 +02:00
Kévin Commaille
685bd34fd4 events: Enforce MessageContent to not be empty 2022-03-26 11:47:01 +01:00
Kévin Commaille
245bf75276 events: Replace Captions with MessageContent
Use a custom serde implementation
2022-03-26 11:47:01 +01:00
Kévin Commaille
93b4114a82 events: Deref MessageContent to a slice 2022-03-26 11:47:01 +01:00
Kévin Commaille
e4463dda22 events: Replace Thumbnails with a Vec 2022-03-26 11:47:01 +01:00
Kévin Commaille
4acfc8d591 events: Use stable field prefix for extensible events
Only transitional room messages will be sent while unstable
2022-03-25 18:07:04 +01:00
Jonas Platte
7fbb28f223
macros: Finish support for variable event types 2022-03-23 21:17:18 +01:00
Jonas Platte
a860fdaa86
macros: Allow variable event types in event_enum!
… the generated `*EventType`s aren't correct yet though.
2022-03-23 21:17:18 +01:00
Jonas Platte
ef9c84716c
common: Allow variable event types in EventContent derive 2022-03-23 21:17:18 +01:00
Kévin Commaille
12ee658e96
events: Use an enum for a media's source
Have stricter media types that accept either an encrypted or plain file.

Co-authored-by: Jonas Platte <jplatte@element.io>
2022-03-22 16:42:42 +01:00
Jonas Platte
f0710fdf1b
events: Make m.room.avatar url optional, always
Removes the feature gate because this has been clarified to be right
in the spec: https://github.com/matrix-org/matrix-spec/pull/987
2022-03-22 14:51:14 +01:00
Jonas Platte
ffd7625a17 api: Rename FromHttpResponseError::{Http => Server} 2022-03-22 13:26:38 +01:00
Jonas Platte
54f9db8ccc macros: Consistently create Incoming* types from Incoming derive
… as a type alias if there are no lifetime generics on the input type.
2022-03-22 13:19:03 +01:00
Jonas Platte
a6a530dcc8 serde: Rename derive macro Outgoing to Incoming
All it does now is generate `Incoming{Self}` types.
2022-03-22 13:19:03 +01:00
Jonas Platte
5cf42f3a86 serde: Remove the Outgoing trait 2022-03-22 13:19:03 +01:00
Kévin Commaille
0fb3f39c07 common: Deserialize stable names for unstable features 2022-03-21 14:46:13 +01:00
Kévin Commaille
12523cd741
common: Add support for transitional extensible text messages 2022-03-21 13:16:44 +01:00
Kévin Commaille
e2375ed72e xtask: Add typos check 2022-03-18 14:29:57 +01:00
Jonas Platte
d94e194b75
common: Fix build error 2022-03-18 12:51:30 +01:00
Kévin Commaille
af61a62202
macros: Add alias attribute to ruma_enum 2022-03-18 12:38:47 +01:00
Kévin Commaille
9b870cd9af
common: Add support for voice message events 2022-03-18 12:13:26 +01:00
Jonas Platte
ada3108a96
common: Move prev_content into unsigned 2022-03-16 16:30:29 +01:00
Kévin Commaille
1f53f38b4f common: Add support for translatable text content.
According to MSC3554
2022-03-16 13:12:58 +01:00
Kévin Commaille
5f51f9241f common: Add thread relation to Relation
According to MSC3440
2022-03-16 12:58:24 +01:00
Jonas Platte
e9c60cf36c
Deprecate the EventType enum 2022-03-16 12:20:18 +01:00
Jonas Platte
ce785064a9
Use RoomEventType instead of EventType for PDUs and power levels 2022-03-16 12:20:17 +01:00
Jonas Platte
6dc0bf248b
Use *EventType enums in more places 2022-03-16 12:20:17 +01:00
Jonas Platte
c16ba45c9e
common: Replace event content marker traits with an associated type 2022-03-16 12:20:16 +01:00
Kévin Commaille
195ddf8112
common: Add support for extensible location events
According to MSC3488
2022-03-15 18:41:05 +01:00
Kévin Commaille
5af2e38506
common: Add support for extensible audio events 2022-03-15 13:34:33 +01:00
Jonas Platte
13e53ea6d5
common: Remove RawExt in favor of inherent impl 2022-03-15 10:05:21 +01:00
Kévin Commaille
57e8b77d87
common: Add support for extensible video events 2022-03-15 09:40:20 +01:00
Kévin Commaille
e336db767a
common: Add support for extensible image events 2022-03-14 10:43:15 +00:00