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
18a37efcac
Update room::name tests
2020-05-02 14:08:16 +02:00
Jonas Platte
f23d7414ec
Update json literal formatting
2020-05-02 11:10:31 +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
28136cf1f6
Update serde attrs in room::history_visibility
2020-05-01 20:03:43 +02:00
Jonas Platte
6e1f8ded2d
Add format, formatted_body to NoticeMessageEventContent
2020-05-01 12:54:37 +02:00
Jonas Platte
a19401c076
Update serde attrs in room::message::feedback
2020-05-01 12:32:49 +02:00
Jonas Platte
d7e2411a68
Use ruma_event! for room::power_levels
2020-05-01 12:14:44 +02:00
Jonas Platte
c00a8cc52e
Update serde attr, add comment
2020-04-30 18:19:35 +02:00
Jonas Platte
0d305d8f24
Update ruma_serde to 0.1.2
2020-04-30 18:07:20 +02:00
Jonas Platte
fd5527da78
Reorder derives (std first)
2020-04-29 22:22:42 +02:00
Jonas Platte
c68df54eef
Simplify impl Deserialize for room::message::MessageEventContent
2020-04-29 22:20:22 +02:00
Jonas Platte
bd22c9d85c
Derive Serialize for types in room::message
2020-04-29 22:03:17 +02:00
Jonas Platte
8944b23a39
Derive Serialize for types in room::encrypted
2020-04-29 21:51:52 +02:00
Jonas Platte
aa42378c3d
Use ruma_event! macro for CanonicalAliasEvent
2020-04-29 21:31:49 +02:00
Jonas Platte
037a4faa6e
Merge serde attributes
2020-04-28 00:30:23 +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
eb3a3e2163
Replace EventResult with EventJson, simplify InvalidEvent
2020-04-22 21:24:39 +02:00
poljar
df05e88793
room-messages: Add the ability to send encrypted room messages
2020-04-22 21:23:41 +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
PipsqueakH
a9e1a2b0b0
Replace all remaining manual implementations by derives
2020-04-05 19:37:04 +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
Will Hakes
fc2d646dd3
Add new_plain
constructor for TextMessageEventContent
2020-03-16 12:48:50 -06:00
Donough Liu
7920445832
Implement helper method and more tests for MemberEvent
2020-03-12 20:45:51 +01:00
poljar
f1bc5438b3
room/encrypted: Fix the OlmV1 deserialization
...
A m.room.encrypted event with the algorithm type
"m.olm.v1.curve25519-aes-sha2" will have multiple ciphertext values.
The documentation for the struct field even mentions that the
ciphertext is a map, yet it only expected one body and one message type.
This patch fixes the de-serialization and puts all the available
ciphertext values into a hashmap.
2020-03-09 11:33:08 +01:00
Marcel
c81cc48aeb
Fix missing "m." in serialization of the "m.relates_to" key
2020-02-28 11:38:44 +01:00
Jonas Platte
2f95a299b7
Fix typo
2020-02-10 15:54:41 +01:00
Jonas Platte
c7d7212b00
Clean up previous commit, update tests
2019-12-17 11:50:56 +01:00
Jonas Platte
dd16d0f2f0
Allow *all* m.room.power_levels fields to be absent
2019-12-16 21:10:55 +01:00
Lu Fennell
9f463bb726
Add validation to NameEvent: name should not exceed 255 bytes
2019-11-24 21:01:29 +01:00
Jonas Platte
60c817e1b0
Restore Rust 1.34.2 compatibility
2019-10-23 02:09:34 +02:00
Jonas Platte
665fe4f4f4
Move (de)serialization helpers to util module
2019-10-22 23:56:03 +02:00
Jonas Platte
63b85f524c
Get rid of redundant clone()s (thanks to clippy)
2019-10-18 23:48:48 +02:00
Jonas Platte
09b8de5b6e
Introduce FromRaw in addition to TryFromRaw
2019-10-15 20:26:30 +02:00
Jonas Platte
a6c34596d7
Rename EventResultCompatible to TryFromRaw
2019-10-15 20:05:46 +02:00
Jonas Platte
c20d79db7d
Inline try_from method into EventResultCompatible
2019-10-08 21:28:18 +02:00
Jonas Platte
05562a48a3
WIP
2019-09-29 13:30:51 +02:00
Jonas Platte
297bae4cbb
Remove FromStr, TryFrom<&'_ str> implementations
2019-09-29 10:56:15 +02:00
Jimmy Cuadra
c309eed2ae
impl Deserialize for m.room.server_acl
2019-08-06 15:23:40 -07:00
Jimmy Cuadra
db89aad22c
impl Deserialize for m.room.canonical_alias
2019-08-06 15:19:55 -07:00
Jimmy Cuadra
35e5ed9491
impl Deserialize for m.room.power_levels
2019-08-06 15:15:33 -07:00