63 Commits

Author SHA1 Message Date
Jonas Platte
486c9245b3
events: Make ImageInfo and ThumbnailInfo non-exhaustive 2021-04-18 14:44:37 +02:00
Jonas Platte
dc57620ae0
events: Make StickerEventContent non-exhaustive 2021-04-18 14:36:24 +02:00
Jonas Platte
7f01a6d73b
events: Make TypingEventContent non-exhaustive and derive Default for it 2021-04-18 14:32:54 +02:00
Devin Ragotzy
29b49d2edf
events: Add codegen for ephemeral event enum room_id accessor 2021-04-16 23:42:29 +02:00
Jonas Platte
cc2f2a231b
events: Fix recently broken test 2021-04-13 13:13:02 +02:00
Kévin Commaille
9cf44a4475
events: Fix test error with unstable-pre-spec feature flag 2021-04-12 12:54:48 +02:00
Jonas Platte
2803ee3721
events: Add public API for custom / unsupported message types 2021-04-11 12:08:31 +02:00
Kévin Commaille
c6ab610451 events: Replace String with MxcUri for media URLs 2021-04-05 08:10:21 +02:00
Adam Blanchet
2e422c5d81
Create ImageInfo struct specific to AvatarEventContent
Add a new specific ImageInfo struct, with all the same fields,
except for `thumbnail_file`, to disallow encrypted room avatars.

Resolves: #397
2021-03-31 11:00:36 +02:00
Andi
6b0bf53601
events: Add message event serialization test 2021-02-18 19:12:58 +01:00
Devin Ragotzy
12c294422b
Move new_content and relates_to fields to MessageEventContent struct
MessageEventContent used to be an enum, it now has a msgtype field where
the enum (now called MessageType) sits.
2021-02-13 00:29:07 +01:00
Jonas Platte
798cd49e9e
events: Use more specific MessageEvent type in room_message test 2021-02-12 20:09:34 +01:00
Akshay
a76d3e24a4
events: Support m.room.message events with custom msgtypes 2021-02-12 14:01:10 +01:00
Jonas Platte
317b2055a8
events: Fix tests for unstable-pre-spec 2021-02-12 13:41:54 +01:00
Jonas Platte
cd2c540e92
events: Make Custom* struct rest fields consistent 2021-02-12 11:24:07 +01:00
Akshay
6bbb42303b
Add event_type accessor method to event enums 2021-02-11 12:48:33 +01:00
Jonas Platte
0a10afe6da
Move m.room.message tests from src/ to tests/ 2021-02-08 12:49:46 +01:00
Akshay
8fadffa31d
events-macros: Use lookahead1 instead of parse().is_ok() 2021-02-06 18:23:40 +01:00
Jonas Platte
7846142690
events: Allow state_key to be empty in InitialStateEvent 2021-02-06 15:15:57 +01:00
Jonas Platte
6f4d883e88
Fix integer literals in PDU tests
They were using a usize suffix which was only valid on 64bit targets.
2021-01-04 01:58:23 +01:00
David Vo
1a4e9aa20a
Implement MSC2448: BlurHashes for media
This exposes the pre-FCP unstable prefixed fields in MSC2448.
2020-12-07 13:01:15 +01:00
Jonas Platte
1ceade7b61
identifiers: Add more crypto-related types
Co-authored-by: Isaiah Inuwa <isaiah.inuwa@gmail.com>
2020-12-02 13:11:28 +01:00
Jonas Platte
5562a23aaa
Move Raw, Outgoing and all macro code from ruma-common to ruma-serde 2020-11-28 03:45:39 +01:00
Jonas Platte
48d1c97475
events: Add rudimentary support for m.new_content 2020-11-25 18:40:48 +01:00
Jonas Platte
b7e15efe43
events: Support attributes on items in event_enum! 2020-11-24 03:25:02 +01:00
Jonas Platte
1dee89393a
events: Fix recently broken tests 2020-11-24 03:24:58 +01:00
Guillem Nieto
34c4b6c110 Remove PduStub
Removed PduStub because is not used anymore on any public endpoint.
2020-11-18 19:30:23 +01:00
Jonas Platte
0f64a6ea39
Fix new clippy warnings 2020-11-10 16:48:35 +01:00
Damir Jelić
8f710a371b
events: Use a custom event for the custom event tests. 2020-11-05 21:15:54 +01:00
Jonas Platte
3b3ef1cb75
Remove test_ prefix from lots of test functions 2020-10-25 23:11:08 +01:00
Jonas Platte
7c535badf6
events: Make some more types non-exhaustive 2020-09-22 23:12:22 +02:00
Jonas Platte
906e50f9a8
Fix clippy error 2020-09-17 22:18:16 +02:00
Jonas Platte
15e1a4bea8
Remove origin field from transactions and pdus for #[feature = "unstable-pre-spec"]
See https://github.com/matrix-org/synapse/issues/3816

Co-authored-by: Timo <timo@koesters.xyz>
2020-09-17 21:24:02 +02:00
Amanda Graven
fdc15123b0
Reorganize encyption related code
Some types used for encryption related tasks need to be used across more
internal crates than expected, so a few have been moved and renamed for
clarity.

* Rename the key_algorithms module in ruma-identifiers-validation to crypto_algorithms
* Move ruma_events::Algorithm to ruma-identifiers-validation and rename it EventEncryptionAlgorithm
* Move DeviceKeys from ruma-client-api to ruma-common
2020-08-10 18:38:53 +02:00
Jonas Platte
1fbf05d71f
Fix some bad formatting 2020-08-08 21:52:58 +02:00
Isaiah Inuwa
7eb945976c Use strong types in signatures fields 2020-08-08 15:54:31 +02:00
Jonas Platte
9bc6ce9201
Use identifier macros for tests 2020-08-05 00:12:44 +02:00
Devin Ragotzy
4be63127f7
Add into_full_event and From<> impls to convert between sync and full events 2020-07-24 14:45:38 +02:00
Devin R
3a0138dea1 Use Box instead of Raw for the redacted Unsigned types redacted_because 2020-07-22 20:29:01 +02:00
Jonas Platte
8d8e18afbc
Make RoomVersionId a non-exhaustive enum 2020-07-22 18:38:37 +02:00
Isaiah Inuwa
ade43c8516 Use ServerName everywhere 2020-07-18 07:50:53 -05:00
Jonas Platte
c9c56c3404
Mark AvatarEventContent as non_exhaustive 2020-07-17 01:07:15 +02:00
Ragotzy.devin
1db0082281
Add redact method to all event_enum! generated enums
… and to AliasesEventContent
2020-07-17 01:07:07 +02:00
skim
b260a13d4b
move and rename ruma_events::json::EventJson to ruma_common::raw::Raw 2020-07-16 07:31:36 -07:00
Ragotzy.devin
e7d9fb785d
Split UnsignedData into multiple types
* Rename UnsignedData -> Unsigned
* Add RedacedUnsigned and RedactedSyncUnsigned
2020-07-16 02:34:36 +02:00
Devin R
6f69a6fe76
Fix redacted aliases event deserialization 2020-07-15 17:10:47 +02:00
Devin R
3f951e931b
Add redacted aliases deserialize test 2020-07-15 17:10:47 +02:00
Devin R
0bfb87fea0
Move UnsignedData creation into function for redacted tests 2020-07-15 17:10:47 +02:00
Jonas Platte
8683901e14
Don't to_string() string literals 2020-07-14 22:11:05 +02:00
Devin R
204a90ac43 Rename *EventStub -> Sync*Event 2020-07-14 13:44:39 -04:00