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
Ragotzy.devin
1db4898cde
Refactor the input parsing of event_enums!
2020-07-13 15:31:15 +02:00
Ragotzy.devin
5e428ac95a
Add support for redacted events
...
* Generate redacted event enums and implement corresponding event structs
* Enable the *EventContent derives to generate redacted events
Most redacted event code is now generated by the *EventContent derive
macro. The exception are any content structs with the custom_redaction
attribute. This leaves implementing up to the user.
* Add redact method to Redaction/CustomEventContent
* Add accessor methods for redacted event enums
* Add RedactedEventContent trait and super traits to match EventContent
2020-07-11 14:59:36 +02:00
Ragotzy.devin
41b8bd77f5
Add field accessor code-gen for the event_enum! macro
2020-06-30 14:59:24 +02:00
Ragotzy.devin
fdf87a38a2
Generate stub/stripped Any*Event enums in event_enum! macro
...
* Conditionally emit tokens for content enum in event_enum! and the path
for each Any*Event variant contents.
* Add tests for redaction events now that they are part of Any*Event enums.
* Fix any tests that used Any*EventContent.
2020-06-23 22:33:37 +02:00
Jonas Platte
034a9b6926
Use js_int::uint macro for UInt constants
2020-06-19 23:00:57 +02:00
Ragotzy.devin
69d5da4018
Add a Custom variant to Any*Event enums
2020-06-19 18:32:42 +02:00
Ragotzy.devin
184aafa5f6
Revert " Remove event_enum! and only use event_content_enum"
...
This reverts commit 2a91dc1eb7215a762bd2204bc103ef172258d2d9. Also
* Add back type defs and Any*Event enums
* Move EventDeHelper and from_raw_json_value to lib make pub so event_enum! macro can use them and test.
* Fix Any*Event enum deserialization error
* Remove event_content_enum! macro and ruma-events-macros/src/content_enum.rs
* Use serde's IgnoreAny to skip Unknown field's value
* Clean up imports and test names for state_event
2020-06-19 11:36:53 +02:00
iinuwa
bfad8cf1f1
Add send transaction endpoint
...
Also refactor PDU types and move them to ruma-events
2020-06-17 11:02:19 +02:00
Devin R
7c934e1b8f
Implement EventContent for CustomEventConent and include in Any*EventContent enums
2020-06-17 00:44:27 +02:00
Ragotzy.devin
f4665761be
Fix failing deserialization when encountering an unknown field
2020-06-16 00:34:58 +02:00
Ragotzy.devin
0381190bdb
Add is_compatible method to event content enums to fix Any*Event deserialization
...
… and add some benchmarks for it
2020-06-15 23:59:31 +02:00
Ragotzy.devin
3ec0936a28
Add back ruma-events/tests/stripped.rs
2020-06-15 11:37:26 +02:00
Jonas Platte
f304c04d1d
Add 'ruma-events/' from commit '00692d532e26f58d48ead9589dc823403c6e59a5'
...
git-subtree-dir: ruma-events
git-subtree-mainline: d59a616e2c363507a89c92f34aa67e86ee2cfb49
git-subtree-split: 00692d532e26f58d48ead9589dc823403c6e59a5
2020-06-10 22:07:24 +02:00