1202 Commits

Author SHA1 Message Date
Kévin Commaille
231775fe3e events: Document transitional extensible events 2022-03-28 19:39:18 +02:00
Kévin Commaille
83f16c83cb common: Remove unnecessary feature dependency 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
826c379e80 events: reorder types in image module 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
Kévin Commaille
0e11996545 events: reorder types in file module 2022-03-28 17:37:04 +02:00
Jonas Platte
deea762b8e events: Add custom Deserialize impls for MediaSource 2022-03-28 16:48:54 +02:00
Jonas Platte
8afc3a1100 events: Add a test for encrypted media sources being preferred 2022-03-28 16:48:54 +02:00
Jonas Platte
0a53fdb391
client-api: Create SpaceRoomJoinRule and use it 2022-03-28 14:35:19 +02:00
Jonas Platte
9de00ae348
client-api: Link to spaces spec section 2022-03-28 14:31:47 +02:00
Jonas Platte
21dead4245
events: Clean up leftover 'src' naming 2022-03-28 14:04:19 +02:00
Jonas Platte
ee029901d7
events: Spell out 'source' (don't use 'src' abbreviation) 2022-03-28 13:22:37 +02:00
Jonas Platte
c9b353a384
Re-export IdParseError type from ruma 2022-03-28 12:34:23 +02:00
Jonas Platte
571fa90b8d
identifiers: Rename Error to IdParseError
… because it's now exported from the ruma-common crate root.
2022-03-28 12:22:28 +02:00
Kévin Commaille
685bd34fd4 events: Enforce MessageContent to not be empty 2022-03-26 11:47:01 +01:00
Kévin Commaille
f9390c7c35 events: Create error type for extensible events conversion 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
Jonas Platte
bf6687c92d
federation-api: Fix unstable-pre-spec tests 2022-03-26 09:36:58 +01:00
Jonas Platte
8f054ba39c
federation-api: Break up some large assert_matches! invocations 2022-03-26 09:16:42 +01:00
Kévin Commaille
70ef702124 events: Document extensible events 2022-03-25 18:07:04 +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
26556259c8
Re-export macro exports module from ruma 2022-03-25 14:03:18 +01:00
Jonas Platte
de565c9af9
events: Make MediaSource an exhaustive enum 2022-03-25 13:07:16 +01:00
Jonas Platte
05ad164d21
macros: Fix errors from unused serde attributes with only server feature active 2022-03-25 12:26:52 +01:00
Jonas Platte
7bef8ea5ef
Fix broken intra-doc links 2022-03-25 11:03:41 +01:00
Jonas Platte
4d52700142
events: Fix non-link URL 2022-03-25 11:02:22 +01:00
Jonas Platte
3d17529d2e
client-api: Make from param optional in get_message_events
… and provide some additional convenience constructors.
2022-03-25 11:01:16 +01:00
Jonas Platte
c32e074383
client-api: Clean up get_message_events docs 2022-03-25 10:14:29 +01:00
Jonas Platte
7a5be040fd
macros: Reduce codegen by feature-gating Serialize and Deserialize derives
… this makes it faster to compiler ruma-*-api with either the client or
server feature inactive.
2022-03-24 18:08:21 +01:00
Jonas Platte
7fbb28f223
macros: Finish support for variable event types 2022-03-23 21:17:18 +01:00
Jonas Platte
316d1423e8
events: Remove AsRef<str> requirement on EventContent::EventType
… and use Display instead of AsRef<str> for Raw<T>::deserialize_content.
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
Damir Jelić
cf8f1b0e7e common: Use DeviceKeyId in more places for the CrossSigningKey type 2022-03-23 17:17:54 +01:00
Damir Jelić
9ed83165d0 common: Use StringEnum for the KeyUsage enum 2022-03-23 17:17:54 +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
9da6bd4861
events: Fix feature gate for aggregated relations
We had a mix of two feature gates because of a mishap in rebasing.
2022-03-22 14:51:14 +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
eb515046d7 api: Add map and transpose methods for FromHttpResponseError and ServerError 2022-03-22 13:26:38 +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
5a791b3c6e macros: Simplify Incoming derive implementation 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