Ragotzy.devin
c2b1c9897b
Any event enum macro implementation (also generates event content enums)
2020-06-09 23:31:31 +02:00
Jonas Platte
b0d775a535
Restore unsigned.redacted_because
2020-06-09 17:02:08 +02:00
Jonas Platte
9478050792
Remove stripped module
2020-06-09 17:01:08 +02:00
Jonas Platte
a317ae6340
Add and re-export remaining event kinds
2020-06-09 16:58:58 +02:00
Jonas Platte
647130c0fb
Clean up lib.rs
2020-06-09 02:24:06 +02:00
Jonas Platte
d377df88b8
Add content_enums::AnyToDeviceEventContent
...
… and remove the now outdated to_device module
2020-06-09 02:22:21 +02:00
Jonas Platte
886320cbf4
Remove event_enums.rs, event enums will be generated
2020-06-09 02:03:00 +02:00
Jonas Platte
924ff5096b
Bring back direct, dummy, push_rules
2020-06-09 01:54:58 +02:00
Jonas Platte
1f2c186ce1
Remove ToDeviceEventContent
...
… since any event can be sent using to-device messaging
2020-06-09 01:22:50 +02:00
Ragotzy.devin
6a0a10fcff
Add BasicEventContent derive and create AnyBasicEventContent enum
...
Also remove PresenceEventContent derive and expand code gen
2020-06-08 23:51:22 +02:00
Ragotzy.devin
800fba7c32
Implement PresenceEvent and EphemeralEvent
...
* Add derive for PresenceEventContent and create struct AnyPresenceEventContent
since there is only one content type
* Add derive for Ephemeral event and create enum AnyEphemeralEventContent, convert
receipt and typing to use derive(EphemeralEventContent) over ruma_api!
2020-06-07 22:56:43 +02:00
Ragotzy.devin
ef3a6787a0
Remove src/from_raw.rs and ruma-events-macro/src/from_raw.rs
2020-06-07 22:21:04 +02:00
Jonas Platte
8c271fb835
Add event_enums.rs
...
only contains AnyStateEvent for now, more will be added
2020-06-07 20:18:07 +02:00
Jonas Platte
dd89b24aa4
Update custom module
2020-06-07 17:50:47 +02:00
Jonas Platte
283370ff2f
Add more event kinds
2020-06-07 16:15:24 +02:00
Jonas Platte
315ac55d46
Replace state.rs, messages.rs by event_kinds.rs, content_enums.rs
2020-06-07 16:01:35 +02:00
Jonas Platte
f531dce754
Externalize generic event struct tests
2020-06-07 15:48:44 +02:00
Ragotzy.devin
0a91ac5126
Remove raw mod and TryFromRaw/FromRaw, derive Deserialize for event content types
2020-06-07 01:18:42 +02:00
Jonas Platte
35eb0bcfbf
Re-export MessageEvent from the crate root
2020-06-07 01:18:41 +02:00
Ragotzy.devin
33ac5267a9
Implement MessageEvent and AnyMessageEventContent
2020-06-07 01:18:34 +02:00
Jonas Platte
5091b9a9a8
Integrate generic event types and EventContent trait with TryFromRaw
2020-06-07 01:11:15 +02:00
Jonas Platte
cc3d0af40c
Make state a private module
2020-06-07 01:10:55 +02:00
Jonas Platte
27a9b36499
Delete collections module
2020-06-07 01:02:49 +02:00
Jonas Platte
5dc1405d9d
Add MessageEventContent trait, update docs
2020-06-07 01:02:49 +02:00
Ragotzy.devin
f0c94958fa
Move raw
mod into FromRaw derive
2020-06-07 01:02:49 +02:00
Ragotzy.devin
1a9b0f3e8b
Add StateEvent<C> and AnyStateEvent
2020-06-07 01:02:49 +02:00
Ragotzy.devin
3d01bfa96d
Remove Event, RoomEvent and StateEvent traits
2020-06-07 01:02:49 +02:00
Jonas Platte
ca5c65ef10
Revise trait implementations
2020-05-02 14:15:13 +02:00
Jonas Platte
0d305d8f24
Update ruma_serde to 0.1.2
2020-04-30 18:07:20 +02:00
Jonas Platte
d837384e58
Make UnsignedData's fields public
2020-04-28 00:30:18 +02:00
Jonas Platte
f783ea6167
Fix unsigned field deserialization
2020-04-28 00:30:05 +02:00
Jonas Platte
55340d18c8
Add struct UnsignedData and update unsigned fields to use it
2020-04-28 00:03:48 +02:00
Jonas Platte
66cecdac6b
Move error types into a dedicated error module
2020-04-27 22:57:59 +02:00
Jonas Platte
6c806052f5
Move custom events, Empty struct into their own modules
2020-04-27 20:45:58 +02:00
Jonas Platte
eb3a3e2163
Replace EventResult with EventJson, simplify InvalidEvent
2020-04-22 21:24:39 +02:00
Jonas Platte
03b7d7e190
Update std::fmt import
2020-04-22 01:44:51 +02:00
Jonas Platte
d30e035d41
Change some lint attributes from deny to warn
2020-04-22 01:20:47 +02:00
Jonas Platte
2480bb292a
Replace HashMap with BTreeMap
2020-04-19 17:46:36 +02:00
Jonas Platte
013decf401
Update formatting of lib.rs
2020-04-19 00:23:07 +02:00
Jonas Platte
dc0a9f88ba
Change timestamp types from UInt to SystemTime
2020-04-17 22:43:30 +02:00
Akshay
8915339e56
Rewrite tests to use serde_json::json!
instead of raw strings
2020-03-31 16:07:09 +02:00
Jonas Platte
cba7b161e9
Update unsigned field's type from Option<Value>
to Map<String, Value>
...
* it's guaranteed to always be an object
* `Option` isn't needed because the distinction empty object / missing
field is not of interest
2020-03-29 15:37:57 +02:00
Ragotzy.devin
14df832005
Remove special handling of custom events
2020-03-24 11:31:47 +01:00
Jonas Platte
5a79b766c7
Revert "Remove special handling of custom events"
...
This reverts commit 539dd5f31dff172b5d6559378e33982d0a0c3333.
2020-03-24 11:31:36 +01:00
Ragotzy.devin
539dd5f31d
Remove special handling of custom events
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2020-03-24 11:27:55 +01:00
Jonas Platte
0c6dd0ba32
Simplify proc_macro tests
...
… by moving them from ruma-events-macros to ruma-events and updating the
macros to work in different contexts (without items like FromRaw being
available at the calling crate's root)
2020-03-17 13:10:40 +01:00
Jonas Platte
016659a99c
Split impl FromRaw
generation into its own macro
2020-03-16 23:27:32 +01:00
Jonas Platte
0efe82bf88
Move FromRaw, TryFromRaw into a new module
2020-03-16 22:48:21 +01:00
poljar
12d725113b
Implement a collection for to-device events
...
To-device events are received in a sync response in a separate field of
the response.
They are sent between dirrectly without involving a room and are not
permanently stored on the serever. They are mostly used to set up
encryption between devices.
This patch implements a enum which encapsulates many of the messages
that will appear in the to-device part of a sync response.
2020-03-11 13:01:37 +01:00
Donough Liu
b03eb0261f
Add more tests for Algorithm and EventType
2020-03-10 22:36:40 +01:00