257 Commits

Author SHA1 Message Date
Jonas Platte
2bb96b5a2b
Use serde_json::value::RawValue instead of serde_json::Value in most endpoints 2020-05-05 22:51:46 +02:00
Jonas Platte
b10e5e9ed1
Add get_media_preview module declaration 2020-05-05 22:51:16 +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
Damir Jelić
5cedf1a963 keys: Make the device display name optional. 2020-05-05 15:31:24 +02:00
poljar
56f2054df5
to_device: Use a RawValue for sending to-device messages 2020-05-05 11:55:41 +02:00
Jonas Platte
fc626d0869
Whitespace and comment wrapping adjustments 2020-05-05 00:41:51 +02:00
Jonas Platte
ae8a629823
Remove dependency on the url crate 2020-05-05 00:16:43 +02:00
Jonas Platte
1ca24515ad
Update remaining r0.4.0 modules to r0.6.0 2020-05-05 00:11:04 +02:00
Jonas Platte
ebd4af10c5
Update join_room_by_id_or_alias 2020-05-04 18:43:51 +02:00
Jonas Platte
e5adfe1181
Rename r0::{client_exchange => to_device} 2020-05-04 18:42:37 +02:00
Jonas Platte
b809db81f4
Update create_message_event, create_state_event_* 2020-05-04 18:34:52 +02:00
Jonas Platte
bc9b43e03f
Update dependencies, use push::Action from ruma-common 2020-05-02 18:52:16 +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
5aef537582
impl Display for UiaaResponse 2020-04-30 15:28:42 +02:00
Jonas Platte
5a26c38764
Remove uses of deprecated UInt::min_value 2020-04-28 19:57:59 +02:00
Jonas Platte
1c3f8712fa
Make all fields in get_message_event response optional 2020-04-28 19:38:15 +02:00
Isaiah Inuwa
762a65ec5e Update search endpoint to r0.6.0 2020-04-25 08:31:55 -05:00
iinuwa
210e3fd4a9
Make display_name of RoomMember optional 2020-04-25 09:30:20 +02:00
Isaiah Inuwa
a761d59a4c Normalize serde_json imports 2020-04-24 20:45:39 -05:00
Jonas Platte
f4b9841590
Fix json escaping breaking login endpoint 2020-04-24 22:30:22 +02:00
Isaiah Inuwa
6e990236c2
Add missing state response field to get_message_events 2020-04-24 12:10:59 +02:00
Isaiah Inuwa
aec59b86aa Add M_USER_DEACTIVATED to ErrorKind 2020-04-23 16:01:51 -05:00
Jonas Platte
eb4b8e559e
Update ruma-api, ruma-events 2020-04-22 22:13:10 +02:00
Damir Jelić
24b9ea7dc9 client_exchange: Use room messages to send out to-device events. 2020-04-22 19:39:18 +02:00
Jonas Platte
738ef99dd7
Implement Display, Error for error::Error 2020-04-20 15:20:41 +02:00
iinuwa
0d080a7ffa
Add UIAA error types 2020-04-19 22:09:45 +02:00
Jonas Platte
c5689f3da5
Replace HashMap with BTreeMap 2020-04-19 16:48:20 +02:00
Jonas Platte
6452401add
Add missing skip_serializing_if = "Option::is_none 2020-04-18 00:27:29 +02:00
Jonas Platte
6ff7d3710b
Replace serde module with ruma-serde, update deps 2020-04-17 23:54:13 +02:00
timokoesters
23dbea1f56
Make join_room_by_id_or_alias deserialization work 2020-04-17 12:14:51 +02:00
Jonas Platte
5ac26cc641
Fix redundant clone 2020-04-16 01:28:35 +02:00
Jonas Platte
adfb5c82fa
Fix unreadable literals 2020-04-16 01:26:34 +02:00
Jonas Platte
6ddb9eca8b
Add serde::opt_ms_since_unix_epoch, use it in device::Device 2020-04-16 00:28:09 +02:00
Jonas Platte
207b77b53d
Update most timestampts to SystemTime 2020-04-16 00:19:11 +02:00
Jonas Platte
befc55e43a
Update get_contact endpoint to r0.6.0 2020-04-15 23:28:35 +02:00
Jonas Platte
214d6521ef
Update tests for serde::duration 2020-04-15 23:19:00 +02:00
Jonas Platte
c35d38c95f
Fix minor style inconsistencies in serde::duration 2020-04-15 23:12:17 +02:00
Ragotzy.devin
9b5b906868
sync_events/get_message_events: ser/de filters to string 2020-04-14 13:44:16 +02:00
iinuwa
bcc06ddd49
Update public rooms endpoint 2020-04-08 23:49:59 +02:00
Isaiah Inuwa
aeb4e237b7
Clarify whether password is optional in registration endpoint. 2020-04-07 11:19:20 +02:00
Isaiah Inuwa
9198a549e7
Add structs for User-Interactive Authentication API. 2020-04-07 11:19:20 +02:00
Isaiah Inuwa
ff8427cb93
Add auth_parameters field to AuthenticationData. 2020-04-07 11:19:20 +02:00
Isaiah Inuwa
abcc8ec1d2
Update register endpoint to r0.6.0 2020-04-07 11:19:20 +02:00
iinuwa
dc582758e4
Add server_name parameter to join_room_by_id_or_alias 2020-04-06 17:28:55 +02:00
timokoesters
d6e4bd9ddc
Fix create_room and sync_events deserialization 2020-04-06 12:23:17 +02:00
Jonas Platte
abc5b5d446
Merge serde attributes 2020-04-03 18:38:16 +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