46 Commits

Author SHA1 Message Date
Florian Jacob
01156ad661 Properly handle CanonicalAliasEvent and NameEvent content being absent, null or empty,
which is allowed by the spec to show those events were deleted:
https://matrix.org/docs/spec/client_server/r0.4.0.html#m-room-canonical-alias
https://matrix.org/docs/spec/client_server/r0.4.0.html#m-room-canonical-alias
2019-02-11 13:50:07 +01:00
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
Florian Jacob
af3a14e3b4 Apply upcoming spec change to m.presence event representation,
making ruma-client more interoperable with synapse.
See https://github.com/matrix-org/matrix-doc/pull/1137 for the details
of the spec change.
Fixes https://github.com/ruma/ruma-client-api/issues/27
2018-09-01 12:22:30 +02: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
0635fbae53 Add m.direct event 2017-11-16 11:22:08 +02:00
Konstantinos Sideris
a9490dbee8 Update matrix events to their latest version 2017-11-16 11:22:07 +02:00
Jimmy Cuadra
dee5cc91bc Update serde to 1.0. 2017-04-21 03:53:11 -07:00
Jimmy Cuadra
4f88b596a7 Update ruma-identifiers to 0.8. 2017-02-03 03:20:52 -08:00
Jimmy Cuadra
f01b722ae2 Update serde to 0.9. 2017-01-26 01:23:38 -08:00
Jimmy Cuadra
a31de2313b Add crate-level documentation. 2016-12-13 01:27:15 -08:00
Jimmy Cuadra
9308226de8 use ruma_signatures::Signatures for m.room.member. 2016-12-11 17:20:08 -08:00
Jimmy Cuadra
c92ce9eeb1 Add types to support heterogeneous collections of events. 2016-12-08 18:10:19 -08:00
Jimmy Cuadra
c7228fc3b3 Add extra_content method for events. 2016-11-29 05:07:12 -08:00
Jimmy Cuadra
ead4e9f294 Restrict Event::Content to Debug + Deserialize + Serialize. 2016-10-21 22:28:21 -07:00
Jimmy Cuadra
f57a1aec48 Derive Clone for basically everything. Close #3." 2016-10-16 16:20:25 -07:00
Jimmy Cuadra
e6c0dd4bdc Update deps, rustc_macro --> proc_macro. 2016-10-16 16:04:29 -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
1fe0436f0e Use serde_derive instead of serde_macros. 2016-09-29 04:37:01 -07:00
Jimmy Cuadra
0dbcbd49f7 Add type aliases for custom events. 2016-08-18 08:46:07 -07:00
Jimmy Cuadra
2eb07f5abd Use Serde annotations instead of manual implementation for enums. 2016-08-03 23:43:08 -07:00
Jimmy Cuadra
f35f2015eb Skip serializing option values that are none. 2016-08-03 03:47:03 -07:00
Jimmy Cuadra
1e1079a904 Extract enum serialization into a macro. 2016-07-30 11:50:58 -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
b016a0b48b Implement Serialize and Deserialize for SessionDescriptionType. 2016-07-29 16:26:23 -07:00
Jimmy Cuadra
145221eace Implement Deserialize for EventType. 2016-07-29 12:28:13 -07:00
Jimmy Cuadra
ee781c72b7 Implement Serialize for EventType. 2016-07-29 10:20:17 -07:00
Jimmy Cuadra
5326091981 Use ruma-identifiers types for ID values. 2016-07-28 03:04:07 -07:00
Jimmy Cuadra
0e5bd95189 Implement Clone for EventType. 2016-07-08 03:23:31 -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
b0b7a3e6ea Remove EventKind trait. 2016-07-02 01:26:22 -07:00
Jimmy Cuadra
05ae55abea Add extra_content field to events and add Custom event variant. 2016-06-30 05:44:31 -07:00
Jimmy Cuadra
b84fc9b23e Add EventKind trait. 2016-06-23 04:13:43 -07:00
Jimmy Cuadra
3a90a96708 Add unsigned field to RoomEvent and StateEvent. 2016-06-23 04:13:27 -07:00
Jimmy Cuadra
68265a9387 Revert the package name to ruma-events. 2016-06-21 21:29:43 -07:00
Jimmy Cuadra
f662f086b3 Use generic types for Event, RoomEvent, and StateEvent. 2016-06-21 03:33:29 -07:00
Jimmy Cuadra
dd1a3979e6 Rename package to ruma-common and namespace event types. 2016-06-20 22:47:51 -07:00
Jimmy Cuadra
09ecdfa470 Derive Debug and {De,}Serialize for all types. 2016-06-04 03:09:32 -07:00
Jimmy Cuadra
fb88a7651a Add EventType::Tag and corresponding module. 2015-11-30 00:09:55 -08:00
Jimmy Cuadra
0270e84a1d Return an EventType from Event::event_type. 2015-11-30 00:05:53 -08:00
Jimmy Cuadra
787f4d0af2 Move each event into its own module. 2015-11-29 23:38:23 -08:00
Jimmy Cuadra
424c0f335d ruma-events 2015-11-29 04:59:34 -08:00