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
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
Jonas Platte
60c817e1b0
Restore Rust 1.34.2 compatibility
2019-10-23 02:09:34 +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
2acca3e3ef
impl Deserialize for m.room.encrypted
2019-08-06 14:54:25 -07:00
Jimmy Cuadra
de23971ee4
Deny and address all warnings.
2019-07-19 15:47:14 -07:00
Jimmy Cuadra
0f55729478
Handle both deserialization and validation errors in FromStr impls.
2019-07-19 14:54:31 -07:00
Jimmy Cuadra
5c2e0e62a9
Implement Serialize for EncryptedEventContent.
2019-07-19 14:53:19 -07:00
Jimmy Cuadra
8b59318629
Sort the unsigned field alphabetically in Serialize impls.
2019-07-19 14:52:49 -07:00
Jimmy Cuadra
21351aaff0
Convert m.room.encrypted to the new API.
2019-07-19 14:52:30 -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
a0a9799c81
Add events from the end-to-end encryption module.
2019-06-14 22:14:11 -07:00