36 Commits

Author SHA1 Message Date
Jonas Platte
b5fa684dfc
Update sync_events::DeviceLists field types 2020-05-21 23:36:07 +02:00
Jonas Platte
89dcb5710b
Add another test for sync_events request deserialization 2020-05-17 18:54:35 +02:00
Jonas Platte
62bf717e62
Update sync_events tests 2020-05-10 12:09:43 +02:00
Damir Jelić
7d80a7f23d sync_events: Make all fields in the response optional except next_batch.
As per spec only the next_batch token is required in a sync response.

This patch makes all of them optional and creates default values when
parsing a response. Serialization is skipped for all of them if they are
empty containers.
2020-05-05 15:31:24 +02:00
Jonas Platte
fc626d0869
Whitespace and comment wrapping adjustments 2020-05-05 00:41:51 +02:00
Jonas Platte
06f8374250
sync_events: make account_data optional 2020-05-01 13:52:49 +02:00
iinuwa
dbb60142cf
Sync endpoint touchups
* Add account_data to sync endpoint.
* Update RoomSummary not to serialize empty optional fields
2020-05-01 11:33:20 +02:00
Jonas Platte
eb4b8e559e
Update ruma-api, ruma-events 2020-04-22 22:13:10 +02:00
Jonas Platte
c5689f3da5
Replace HashMap with BTreeMap 2020-04-19 16:48:20 +02:00
Jonas Platte
6ff7d3710b
Replace serde module with ruma-serde, update deps 2020-04-17 23:54:13 +02:00
Ragotzy.devin
9b5b906868
sync_events/get_message_events: ser/de filters to string 2020-04-14 13:44:16 +02:00
timokoesters
d6e4bd9ddc
Fix create_room and sync_events deserialization 2020-04-06 12:23:17 +02:00
Jonas Platte
cf40608b78
Add missing attribute to timeout field
… in sync_events' Request type, plus a regression test
2020-04-03 18:37:25 +02:00
Jonas Platte
0c44e73a78
Bump js_int, add regression test
The version bump fixes an issue where `UInt`s or `Duration`s in the
query string would fail
to deserialize
2020-04-03 18:22:52 +02:00
poljar
3dfb500bba
sync_events: Fix RoomSummary serde attributes
* Create an empty heroes vector if the response doesn't contain it.

  The heroes map is strictly optional and as is deserialization might fail
  for the whole response unless we allow it to be optional.

* Rename the room summary fields during (de)serialization.
2020-04-03 14:01:12 +02:00
Jonas Platte
09ac2404de
Add a test for sync_events::Request serialization 2020-04-03 11:56:49 +02:00
Isaiah Inuwa
67257e15e8
Remove stray TODO comment 2020-03-29 18:58:31 +02:00
Jonas Platte
78744a3a98
Further refine the sync endpoint's types 2020-03-29 18:55:24 +02:00
Isaiah Inuwa
e607587a67
Format code 2020-03-29 18:51:44 +02:00
Isaiah Inuwa
2cced78edf
Update sync endpoint 2020-03-29 18:51:44 +02:00
Ragotzy.devin
1e3769a0f1
impl EndpointError for Error
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com>
2020-03-22 03:08:08 +01:00
iinuwa
122097cfef
Use Duration over UInt for timeouts and similar fields 2020-03-20 11:29:51 +01:00
Damir Jelić
7307c695e0 sync_events: Parse the to-device events. 2020-03-13 16:53:02 +01:00
Jonas Platte
e7526b88cb
Update ruma-events to 0.17.0 2020-03-12 21:38:51 +01:00
Jonas Platte
26d7e2f04d
Limit events in sync_events::Presence to PresenceEvents 2019-12-31 17:09:15 +01:00
Jonas Platte
e30c82d248
Update ruma-api, restore request receiving / response sending support 2019-11-28 22:03:17 +01:00
Jonas Platte
134738f676 Remove stuff only needed for server-side usage 2019-10-17 00:41:18 +02:00
Jonas Platte
98e0bad1b1 Update to the new ruma-events API 2019-08-15 23:25:01 +02:00
Jonas Platte
90b850a60d Update dependencies (except ruma-events) 2019-08-03 19:43:09 +02:00
Jimmy Cuadra
e7e4d04244 Undo the change of storing FilterDefinition in a box.
On second thought, it doesn't make sense to change this just cause of a
clippy warning. We'll wait and see if it ever causes and real problems
before making the API less consistent just to avoid a potential space
saving issue.
2019-07-08 14:24:07 -07:00
Jimmy Cuadra
a16eb7cfe1 Use js_int types for numbers.
See https://github.com/ruma/ruma-events/issues/27 for rationale.
2019-06-16 16:32:56 -07:00
Jimmy Cuadra
4a4c2dd025 Add rustfmt and clippy to CI and address clippy warnings. 2019-06-02 18:14:37 -07:00
Jimmy Cuadra
8f1d4a4d21 Update all spec links to the r0.4.0 version. 2019-05-01 20:46:57 -07:00
Jonas Platte
af954220bd Replace serde_derive by re-exports in serde 2019-02-06 20:36:39 +01:00
Jonas Platte
71f6a93d76 r0::sync::sync_events: Fix (de)serialization of filter argument 2019-02-02 22:11:59 +01:00
Alejandro Domínguez
d48fc54c96 Use folders instead of mods 2019-01-22 18:41:41 +01:00