53 Commits

Author SHA1 Message Date
Jonas Platte
7f18e1c32e Replace serde_derive by re-exports in serde 2019-02-06 20:12:30 +01:00
Jonas Platte
1b2cd339cb Update to Rust 2018 2019-01-16 00:13:10 +01:00
Jonas Platte
6f093f70ed Use nested imports, misc. import changes
* Bring imports into a consistent order (std, crates, internal)
* Replace super::super-imports by crate-relative ones
2019-01-16 00:13:10 +01:00
Victor Berger
e9fc9b03fd Make room_id optional
This field can be absent in some contextes, notably in the responses
to the /sync endpoint, where the events are summarised in the initial
sync of a client.

Fixes #19
2019-01-08 18:27:33 +01:00
Jimmy Cuadra
3acc5c3a93 Run rustfmt. 2018-05-18 23:54:13 -07:00
Konstantinos Sideris
3a62aaf4c7 Add m.room.pinned_events 2017-11-27 17:08:51 +02:00
Konstantinos Sideris
a9490dbee8 Update matrix events to their latest version 2017-11-16 11:22:07 +02:00
Jonas Platte
b741ec3028 Use more descriptive names for properties with one-character-names in the spec 2017-08-04 10:35:56 +02:00
Jonas Platte
b852b15134 Fix grammar in doc comments 2017-08-03 22:16:52 +02:00
Jonas Platte
4a91932ea8 Fix a bunch more deserialization bugs 2017-08-03 22:16:52 +02:00
Andreas Brönnimann
0c027fea5e Add default values for various power level attributes. 2017-04-27 22:11:01 +02:00
Jimmy Cuadra
edefffe220 Replace try macro with question mark. 2017-04-21 04:05:30 -07:00
Jimmy Cuadra
dee5cc91bc Update serde to 1.0. 2017-04-21 03:53:11 -07:00
Andreas Brönnimann
2834dd4632 Make the federate field optional 2017-02-26 22:37:48 +01:00
Jimmy Cuadra
f01b722ae2 Update serde to 0.9. 2017-01-26 01:23:38 -08:00
Jimmy Cuadra
9308226de8 use ruma_signatures::Signatures for m.room.member. 2016-12-11 17:20:08 -08:00
Jimmy Cuadra
f57a1aec48 Derive Clone for basically everything. Close #3." 2016-10-16 16:20:25 -07:00
Jimmy Cuadra
6200bbeca6 Add some of the types for m.room.member's third_party_invite field. 2016-10-02 04:00:49 -07:00
Jimmy Cuadra
8392852741 Convert Event, RoomEvent and StateEvent into traits. 2016-10-02 03:46:16 -07:00
Jimmy Cuadra
f3acdfd141 Reintroduce macro for enum Display and FromStr impls. 2016-10-01 04:25:45 -07:00
Jimmy Cuadra
2eb07f5abd Use Serde annotations instead of manual implementation for enums. 2016-08-03 23:43:08 -07:00
Jimmy Cuadra
85578cf76f Implement Serialize and Deserialize for MessageEventContent. 2016-08-03 04:01:13 -07:00
Jimmy Cuadra
f35f2015eb Skip serializing option values that are none. 2016-08-03 03:47:03 -07:00
Jimmy Cuadra
ca4c8a6784 Remove derived impls for Serialize and Deserialize for MessageType. 2016-07-30 12:04:22 -07:00
Jimmy Cuadra
cff81e625b Implement Serialize and Deserialize for MessageType. 2016-07-30 11:56:44 -07:00
Jimmy Cuadra
1e1079a904 Extract enum serialization into a macro. 2016-07-30 11:50:58 -07:00
Jimmy Cuadra
e8fba65f84 Implement Serialize and Deserialize for MembershipState. 2016-07-30 10:57:44 -07:00
Jimmy Cuadra
d11ef217a2 Factor the custom Serde Visitor out into a generic type. 2016-07-29 17:37:08 -07:00
Jimmy Cuadra
01d22eb526 Implement Serialize and Deserialize for JoinRule. 2016-07-29 17:12:12 -07:00
Jimmy Cuadra
8faaefe8be Implement Serialize and Deserialize for HistoryVisibility. 2016-07-29 17:06:01 -07:00
Jimmy Cuadra
9eceb9578c Implement Serialize and Deserialize for GuestAccess. 2016-07-29 16:54:58 -07:00
Jimmy Cuadra
5326091981 Use ruma-identifiers types for ID values. 2016-07-28 03:04:07 -07:00
Jimmy Cuadra
070a6fe633 Add second generic parameter to events and add missing docs. 2016-07-02 03:33:10 -07:00
Jimmy Cuadra
68265a9387 Revert the package name to ruma-events. 2016-06-21 21:29:43 -07:00
Jimmy Cuadra
dd1a3979e6 Rename package to ruma-common and namespace event types. 2016-06-20 22:47:51 -07:00
Jimmy Cuadra
4043de42ee Add m.room.message types. 2016-06-04 04:01:42 -07:00
Jimmy Cuadra
09ecdfa470 Derive Debug and {De,}Serialize for all types. 2016-06-04 03:09:32 -07:00
Jimmy Cuadra
d525766c99 Make all fields public. 2016-06-04 02:57:24 -07:00
Jimmy Cuadra
fd03a1e162 Make all fields owned values and remove event traits. 2016-06-04 02:49:24 -07:00
Jimmy Cuadra
5323deac93 Add ThirdPartyInviteEvent. 2015-12-07 00:34:25 -08:00
Jimmy Cuadra
43c59f906b Add TopicEvent. 2015-12-07 00:23:39 -08:00
Jimmy Cuadra
d9614ab373 Add RedactionEvent. 2015-12-05 00:26:35 -08:00
Jimmy Cuadra
56a3b9cfe0 Add PowerLevelsEvent. 2015-12-01 06:17:27 -08:00
Jimmy Cuadra
58d18f70e2 Add NameEvent. 2015-12-01 06:07:39 -08:00
Jimmy Cuadra
b224c7c6cf Add partial implementation of MemberEvent. 2015-12-01 05:36:38 -08:00
Jimmy Cuadra
982a1664dd Add GuestAccessEvent. 2015-11-30 00:45:52 -08:00
Jimmy Cuadra
0270e84a1d Return an EventType from Event::event_type. 2015-11-30 00:05:53 -08:00
Jimmy Cuadra
149bf66da8 Add AvatarEvent and ImageInfo. 2015-11-29 23:55:12 -08:00
Jimmy Cuadra
787f4d0af2 Move each event into its own module. 2015-11-29 23:38:23 -08:00
Jimmy Cuadra
074d966c80 Add JoinRulesEvent. 2015-11-29 18:47:09 -08:00