456 Commits

Author SHA1 Message Date
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
c1ee72db0f
Use PresenceState from ruma_common 2020-06-04 21:15:14 +02:00
Jonas Platte
61e6493432
Sort derives by crate 2020-06-04 21:03:34 +02:00
Jonas Platte
3f74ba3270 Box optional sub-structs in avatar and message events
… to heavily decrease the size of some types.
Most importantly: MessageEventContent goes from 640 to 104 bytes in size
2020-06-04 17:48:52 +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
Jonas Platte
7395f940a7
Change PushCondition from using newtype variants to struct variants 2020-05-31 23:26:41 +02:00
Jonas Platte
da7a97d490
Fixup for 16b9557 2020-05-31 22:56:51 +02:00
Jonas Platte
16b9557d74
Consolidate formatted body fields for message events 2020-05-31 16:10:01 +02:00
Jonas Platte
70b3ff2737
Update Matrix specification links 2020-05-31 15:50:17 +02:00
Timo Kösters
4d09416cd1
Add alt_aliases to CanonicalAliasEventContent 2020-05-30 17:51:23 +02:00
Jake Waksbaum
e05fdf84fd
Replace serde/strum renames with rename_all
Instead of applying a `#[serde(rename = "foo")]` or `#[strum(serialize =
"foo")]` to each field of a struct or variants of an enum, apply the
appropriate `#[serde(rename_all = "style")]` or `#[strum(serialize_all =
"style")]` to the struct/enum.

In addition, in the places where the `lowercase` style is used and all
the fields/variants are a single word, replace that with `snake_case`,
since that seems to be the default everywhere with multi-word
fields/variants.
2020-05-29 10:59:33 -04: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
d083127297
Update change log, bump versions 2020-05-26 18:45:12 +02:00
Jonas Platte
655e73dcf6
Update macro dependencies 2020-05-26 18:44:52 +02:00
Jonas Platte
a17714669d
Update change log 2020-05-26 10:26:49 +02:00
Jonas Platte
a398be6dd1
Fix test for m.room.create event 2020-05-26 10:25:23 +02:00
Jonas Platte
d3ff2b65a7
Implement Default for PowerLevelsEventContent 2020-05-26 10:24:14 +02:00
Jonas Platte
d121192f69
Update change log 2020-05-26 10:11:35 +02:00
Jonas Platte
512496baeb
Add skip_serializing_if to CreateEventContent 2020-05-26 10:04:57 +02:00
Jonas Platte
38fec0b0a9
Fix typo 2020-05-24 19:05:17 +02:00
Jonas Platte
bb083b1d19
Add a test for m.room_key serialization 2020-05-24 18:50:19 +02:00
Jonas Platte
114f739d43
Re-add type field serialization for MessageEvent
It was removed in b8eafc3f5937589f1c75dac74ceb796041a72b82, probably by
accident
2020-05-24 18:44:06 +02:00
Jonas Platte
5a0935cd6b
Fix message test naming 2020-05-24 18:29:33 +02:00
Devin R
54fcc36735 remove allow clippy::identity_conversion 2020-05-23 13:31:14 +02:00
Jonas Platte
d6cfbaa47d
Bump dependencies, versions 2020-05-19 12:27:57 +02:00
Jonas Platte
206a824f3e
Add EventJson::into_json 2020-05-09 15:42:31 +02:00
Jonas Platte
4eb72e4cf0
Remove tests for ruma_common types, they now live in that crate 2020-05-04 23:09:10 +02:00
Jonas Platte
cb413ff358
Normalize derive order in room_key_requests 2020-05-04 22:10:51 +02:00
Jonas Platte
c2e3298b2a
Fix duplicate msgtype field in m.message serialization 2020-05-03 23:11:34 +02:00
Jonas Platte
f30df65dba
Bump version 2020-05-03 01:00:39 +02:00
Jonas Platte
e59aeb97b4
Update change log 2020-05-03 01:00:25 +02:00
Jonas Platte
62772f4c7f
Bump macro dependency versions 2020-05-03 01:00:07 +02:00
Jonas Platte
0b26d71537
Re-run cargo fmt 2020-05-02 23:36:03 +02:00
Jonas Platte
b29263fe85
Import-rename serde_json::Value to JsonValue 2020-05-02 23:33:47 +02:00
Jonas Platte
b8eafc3f59
Update room::message
* Derive Deserialize for raw::MessageEventContent
* Remove MessageType
2020-05-02 23:25:46 +02:00
Jonas Platte
2f706d9a85
Remove invalid variant from room::message::MessageEventContent 2020-05-02 23:12:50 +02:00
Jonas Platte
fc78e49d49
Update representation of encrypted event content 2020-05-02 22:54:42 +02:00
Jonas Platte
d47f1831a7
Remove pointless match 2020-05-02 22:52:07 +02:00
Jonas Platte
17faaaa56e
Bump MSRV to 1.40.0 2020-05-02 22:14:05 +02:00
Jonas Platte
14ba542ba1
Derive deserialize for key::verification::start::raw::StartEventContent 2020-05-02 22:11:27 +02:00
Jonas Platte
f65615075e
Update serde attrs for room::message::LimitType 2020-05-02 21:28:13 +02:00
Jonas Platte
51ad28081e
Use ruma_event! for room::server_acl 2020-05-02 21:25:02 +02:00
Jonas Platte
23204d7948
Use ruma_event for ignored_user_list 2020-05-02 21:19:06 +02:00
Jonas Platte
24f519ba29
Update serde attrs in room::guest_access 2020-05-02 18:49:12 +02:00
Jonas Platte
a3f377ec39
Use ruma_common::{Action, Tweak} 2020-05-02 14:17:10 +02:00
Jonas Platte
08418daeb2
Remove NotificationPowerLevels::is_default 2020-05-02 14:16:31 +02:00
Jonas Platte
ca5c65ef10
Revise trait implementations 2020-05-02 14:15:13 +02:00
Jonas Platte
a512df0321
Update key::verification::start tests 2020-05-02 14:08:49 +02:00
Jonas Platte
18a37efcac
Update room::name tests 2020-05-02 14:08:16 +02:00