56 Commits

Author SHA1 Message Date
Jonas Platte
10ad9760d6 Extend MembershipChange::ProfileChanged 2020-06-10 09:43:14 +02:00
Jonas Platte
7491b33e81
Add MemberEvent type alias 2020-06-09 23:38:14 +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
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
5091b9a9a8
Integrate generic event types and EventContent trait with TryFromRaw 2020-06-07 01:11:15 +02:00
Jonas Platte
1377487b6c
Declare more state event content structs without ruma_event! 2020-06-07 01:10:54 +02:00
Ragotzy.devin
3d01bfa96d
Remove Event, RoomEvent and StateEvent traits 2020-06-07 01:02:49 +02:00
Jonas Platte
61e6493432
Sort derives by crate 2020-06-04 21:03:34 +02:00
Jonas Platte
2eb29abd74
Remove FIXME in member.rs
This is being adressed in the spec, see
https://github.com/matrix-org/matrix-doc/pull/2591
2020-06-02 12:16:51 +02:00
Jake Waksbaum
d84de004c8
Replace impl_enum with strum::{EnumString,Display}
Replace the impl_enum! macro, which automatically derives instances of
std::fmt::Display and std::string::FromStr, with derive macros from the
strum crate (Display and EnumString resp.).

Closes #90.
2020-05-29 10:59:33 -04:00
Jonas Platte
17faaaa56e
Bump MSRV to 1.40.0 2020-05-02 22:14:05 +02:00
Jonas Platte
ca5c65ef10
Revise trait implementations 2020-05-02 14:15:13 +02:00
Jonas Platte
8e4ff82a83
Stop relying on PartialEq for tests 2020-05-02 00:17:41 +02:00
Jonas Platte
752ea73010
Update serde attrs in room::member 2020-05-01 20:19:55 +02:00
Jonas Platte
c00a8cc52e
Update serde attr, add comment 2020-04-30 18:19:35 +02:00
Jonas Platte
fd5527da78
Reorder derives (std first) 2020-04-29 22:22:42 +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
2480bb292a
Replace HashMap with BTreeMap 2020-04-19 17:46:36 +02:00
Jonas Platte
dc0a9f88ba
Change timestamp types from UInt to SystemTime 2020-04-17 22:43:30 +02:00
Jonas Platte
5768737cbe
Remove needless clone 2020-04-17 22:43:14 +02:00
Jonas Platte
5623e71e9b
Fix a typo 2020-04-17 11:57:18 +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
Akshay
f09ab98f17
Remove manual Serialize impl, use derive macro instead 2020-03-29 13:41:42 +02:00
Ragotzy.devin
8ea971b082
Derive Serialize in ruma_events!, use json EventType string for event_type field
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2020-03-24 14:25:50 +01:00
Donough Liu
7920445832
Implement helper method and more tests for MemberEvent 2020-03-12 20:45:51 +01:00
Jimmy Cuadra
de23971ee4 Deny and address all warnings. 2019-07-19 15:47:14 -07:00
Jimmy Cuadra
d5b38354d0 Convert m.room.member to the new API. Remove dependency on
ruma-signatures.
2019-07-19 14:58:07 -07:00
Jimmy Cuadra
4212c9f619 Convert m.room.{aliases ,avatar ,encryption ,guest_access,
history_visibility, join_rules, member, pinned_events,
third_party_invite, tombstone, topic} to the new API.
2019-07-19 14:40:48 -07:00
Jimmy Cuadra
c3f48c5be3 Use js_int types for numbers.
Closes #27.
2019-06-16 16:16:37 -07:00
Jimmy Cuadra
9b17d5729a Use a consistent style for the name of the library. 2019-06-15 00:07:44 -07:00
Jimmy Cuadra
12212789b3 Future-proof enums with a __Nonexhaustive variant.
This can be replaced with the #[non_exhaustive] compiler attribute once
it's stabilized.
2019-06-14 18:18:47 -07:00
Jimmy Cuadra
add7ef0d8b Add blank lines to make type definitions easier to read. 2019-06-14 14:02:03 -07:00
Jimmy Cuadra
110234827e Add a note about m.room.member's invite_room_state data. 2019-06-13 17:06:42 -07:00
Jimmy Cuadra
ba2538dda9 Update existing events for spec r0.5.0 and add m.fully_read and
m.room.message.feedback.
2019-06-12 16:20:10 -07: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
Jimmy Cuadra
3acc5c3a93 Run rustfmt. 2018-05-18 23:54:13 -07:00
Konstantinos Sideris
a9490dbee8 Update matrix events to their latest version 2017-11-16 11:22:07 +02: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
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
e8fba65f84 Implement Serialize and Deserialize for MembershipState. 2016-07-30 10:57:44 -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