Ragotzy.devin
214c1b681f
Add guard in ruma_api! macro for invalid characters in path
...
Returns a compiler error if any non ASCII characters are found. Add
trybuild test for invalid path characters.
2020-07-02 16:27:49 +02:00
Ragotzy.devin
b08b1d1819
Refactor large blocks of Api::to_tokens into separate functions
2020-07-01 23:35:18 +02:00
Devin R
ff2cbc282b
Add trybuild tests for the ruma_api! macro
2020-07-01 21:27:47 +02:00
skim
3a515124ec
Add profile information query endpoint
2020-06-30 22:52:20 -07:00
Ragotzy.devin
41b8bd77f5
Add field accessor code-gen for the event_enum! macro
2020-06-30 14:59:24 +02:00
Ragotzy.devin
5376a3fc6e
Add colons to ruma_api! macro after each keyword
2020-06-30 13:06:37 +02:00
Ragotzy.devin
87fb2c1e00
Add #[ruma_api(body)] attr to get_room_event endpoint
2020-06-27 22:26:20 +02:00
Guillem Nieto
202af7a523
Skip serializing optional values on RoomEncryption
...
If this parameters are not skipped, they are sent as null and some
clients (at least, Riot) coerces them to 0.
2020-06-25 21:06:27 +02:00
Ragotzy.devin
928fe6ce26
Add AnyEphemeralRoomEventStub and use it in sync response
2020-06-25 13:19:39 +02:00
Philippe Laflamme
567cfea7ac
Use UserId instead of string in r0::account::whoami
2020-06-24 16:19:25 +02:00
Devin R
2b6eba69dd
Add membership_change method to stub and stripped event
...
Fix redaction event detection in event_enum! macro. Add encrypted event
to AnyMessageEvent enum.
2020-06-24 02:11:28 +02:00
Ragotzy.devin
fdf87a38a2
Generate stub/stripped Any*Event enums in event_enum! macro
...
* Conditionally emit tokens for content enum in event_enum! and the path
for each Any*Event variant contents.
* Add tests for redaction events now that they are part of Any*Event enums.
* Fix any tests that used Any*EventContent.
2020-06-23 22:33:37 +02:00
Jonas Platte
75ea42961f
Use strum(serialize_all) instead of strum(to_string)
2020-06-23 12:52:21 +02:00
Jonas Platte
c5db6d56ad
Remove RoomVersionId::custom constructor
...
It could be used to create invalid room versions like an empty one or
one with more than 32 code points.
2020-06-23 12:40:01 +02:00
Kinrany
99999af08d
Create a dedicated type for PushCondition::RoomMemberCount::is
2020-06-21 21:20:43 +02:00
Jonas Platte
46c4f12404
identifiers: Move is_valid_server_name logic to server_name::try_from
2020-06-21 18:47:59 +02:00
Jonas Platte
286b210779
ruma-serde: Use the new form_urlencoded crate instead of url
2020-06-20 00:30:01 +02:00
Jonas Platte
ba1aaba53e
appservice-api: Remove unused dependency on url
2020-06-20 00:28:33 +02:00
Jonas Platte
034a9b6926
Use js_int::uint macro for UInt constants
2020-06-19 23:00:57 +02:00
Jonas Platte
c621f220b9
Bump dependency versions
2020-06-19 22:53:07 +02:00
Jonas Platte
e42223b1e4
Remove support for serializing floats
...
This removes ruma-serde's dependency on dtoa. Removing deserialization
support could be done later, but would actually make the code more
complex, so is left out for now.
2020-06-19 22:06:17 +02:00
Ragotzy.devin
69d5da4018
Add a Custom variant to Any*Event enums
2020-06-19 18:32:42 +02:00
Ragotzy.devin
184aafa5f6
Revert " Remove event_enum! and only use event_content_enum"
...
This reverts commit 2a91dc1eb7215a762bd2204bc103ef172258d2d9. Also
* Add back type defs and Any*Event enums
* Move EventDeHelper and from_raw_json_value to lib make pub so event_enum! macro can use them and test.
* Fix Any*Event enum deserialization error
* Remove event_content_enum! macro and ruma-events-macros/src/content_enum.rs
* Use serde's IgnoreAny to skip Unknown field's value
* Clean up imports and test names for state_event
2020-06-19 11:36:53 +02:00
Jonas Platte
f9639e110e
client-api: Add constructors for the types in unversioned
2020-06-18 21:33:22 +02:00
Alan Darmasaputra
4abcc4c0bd
Change get_message_events Request limit field from Option<UInt> to UInt
2020-06-18 17:18:17 +02:00
Jonas Platte
1aed6ab52b
Fix intra_doc_link_resolution_failure warnings
2020-06-18 12:27:21 +02:00
Jonas Platte
046668466c
identifiers: Add more conversion functions
2020-06-18 12:11:52 +02:00
iinuwa
f8492db766
Add ServerName identifier
2020-06-18 11:21:00 +02:00
Isaiah Inuwa
8ee1b2302d
Correct documentation of remote server keys batch query endpoint
2020-06-17 22:08:00 -05:00
Jonas Platte
c20d52e2af
identifiers: Update DeviceKeyId::device_id
to return a reference instead of cloning
2020-06-17 12:15:38 +02:00
iinuwa
bfad8cf1f1
Add send transaction endpoint
...
Also refactor PDU types and move them to ruma-events
2020-06-17 11:02:19 +02:00
Devin R
7c934e1b8f
Implement EventContent for CustomEventConent and include in Any*EventContent enums
2020-06-17 00:44:27 +02:00
Jonas Platte
8195496cfd
events: Remove unused util module
2020-06-16 02:15:54 +02:00
Jonas Platte
d78cd2ed15
Fix deserializing event enums from serde_json::Value
...
(or anything else that's not a JSON string)
2020-06-16 02:12:13 +02:00
Ragotzy.devin
f4665761be
Fix failing deserialization when encountering an unknown field
2020-06-16 00:34:58 +02:00
Jonas Platte
f2f283c965
Optimize event enum deserialization
...
Criterion reports ~25% improved performance
2020-06-16 00:29:05 +02:00
Ragotzy.devin
0381190bdb
Add is_compatible method to event content enums to fix Any*Event deserialization
...
… and add some benchmarks for it
2020-06-15 23:59:31 +02:00
Jonas Platte
c40e3974e7
Remove ruma_events::InvalidEvent
2020-06-15 22:59:49 +02:00
Jonas Platte
418f92153d
ruma-client-api: Re-add r0::push::Action as deprecated, update change log
2020-06-15 19:21:04 +02:00
Jonas Platte
1d954f3089
Deprecate / remove re-exports from ruma_common
2020-06-15 19:20:34 +02:00
Jonas Platte
83d8f8c43e
Move some types from ruma_events::push_rules to ruma_common::push
2020-06-15 19:05:17 +02:00
Ragotzy.devin
3ec0936a28
Add back ruma-events/tests/stripped.rs
2020-06-15 11:37:26 +02:00
Isaiah Inuwa
9074e4c17a
Update event creation endpoints to r0.6.1
2020-06-14 20:35:44 -05:00
Jonas Platte
43ae129ce2
Add a test to get_member_events
2020-06-14 01:09:52 +02:00
Ragotzy.devin
9dab2f5b1f
Fix clippy warning in nightly CI
2020-06-13 14:02:53 +02:00
Jonas Platte
9e04d648ca
events: Make almost all enums non_exhaustive
2020-06-13 00:32:44 +02:00
Jonas Platte
40d3c8ae66
events: Remove stripped.rs (whose mod declaration was already removed previously)
2020-06-13 00:28:29 +02:00
Jonas Platte
a9189d7db3
events: Remove EventJson from presence tests
2020-06-13 00:26:57 +02:00
Devin R
a6feed7dcb
Convert Timeline's events field AnyRoomEvent -> AnyRoomEventStub
2020-06-12 22:31:56 +02:00
Devin R
a4dd53ef98
Use AnyStateEventStub for /sync response state events
2020-06-12 01:42:24 +02:00