Ragotzy.devin
1db0082281
Add redact method to all event_enum! generated enums
...
… and to AliasesEventContent
2020-07-17 01:07:07 +02:00
skim
b260a13d4b
move and rename ruma_events::json::EventJson to ruma_common::raw::Raw
2020-07-16 07:31:36 -07:00
Jonas Platte
f517099825
Mark m.room.aliases content as non_exhaustive
2020-07-16 02:48:11 +02:00
Ragotzy.devin
e7d9fb785d
Split UnsignedData into multiple types
...
* Rename UnsignedData -> Unsigned
* Add RedacedUnsigned and RedactedSyncUnsigned
2020-07-16 02:34:36 +02:00
Jonas Platte
9d94b59f7d
Fix formatting of ruma-federation-api/CHANGELOG.md
2020-07-16 02:16:39 +02:00
Devin R
101b8689a5
Add unstable-synapse-quirks feature for Sessions struct and fields
2020-07-15 19:17:03 -04:00
Devin R
254b24fb20
Add pre-spec fields to r0::keys::get_keys::Response
2020-07-15 19:14:57 -04:00
Devin R
605680530b
Add ability to feature gate fields in ruma_api! macro
2020-07-15 19:14:04 -04:00
Devin R
6f69a6fe76
Fix redacted aliases event deserialization
2020-07-15 17:10:47 +02:00
Devin R
3f951e931b
Add redacted aliases deserialize test
2020-07-15 17:10:47 +02:00
Devin R
0bfb87fea0
Move UnsignedData creation into function for redacted tests
2020-07-15 17:10:47 +02:00
Ragotzy.devin
24b0068213
Add unstable backup and keys/upload_signing/signature endpoints
...
Co-authored-by: Timo Kosters <timo@koesters.xyz>
2020-07-15 15:53:35 +02:00
Jonas Platte
7cfec8631a
Use the matches! macro in more places
2020-07-15 15:51:09 +02:00
Jonas Platte
501652a272
Fix unused import warnings
2020-07-15 15:49:04 +02:00
Damir Jelić
b5b0ca267b
ruma-events: Update the constructor of the start event for the new key agreement.
2020-07-15 12:25:00 +02:00
Damir Jelić
9eb0266cb0
ruma-events: Test the key agreement serialization/deserialization.
2020-07-15 12:23:11 +02:00
Damir Jelić
02d7f8d17b
ruma-events: Expose the content fields of the verification start event publicly.
2020-07-15 12:23:10 +02:00
Damir Jelić
c93cfb986b
ruma-events: Add the new key agreement method.
2020-07-15 12:22:53 +02:00
Jonas Platte
ded60cc935
Use matches! instead of manual match
-> bool
2020-07-15 12:21:32 +02:00
Jonas Platte
60238bbb85
Fix doc_concat macro on older versions of rustc
2020-07-15 02:02:14 +02:00
Jonas Platte
1a1884ce81
identifiers: Bump version (prerelease), update change log
2020-07-15 00:45:47 +02:00
Jonas Platte
a3e5d679a1
Revert making identifier types generic over the underlying string type
...
At the same time, this commit makes `ServerName` a newtype around str so
other identifier types can borrow out their server name part as a
`&ServerName`. This technique works for `ServerName` because it keeps no
additional metadata. For the other identifier types to support being
created in borrowed form from a string slice, custom DSTs first have to
be added to Rust.
2020-07-14 23:02:51 +02:00
Jonas Platte
8683901e14
Don't to_string() string literals
2020-07-14 22:11:05 +02:00
Devin R
204a90ac43
Rename *EventStub -> Sync*Event
2020-07-14 13:44:39 -04:00
skim
7b909efccc
update type of limited
in r0::sync::sync_events::Timeline
from Option<bool>
to bool
2020-07-13 14:35:27 -07:00
Ragotzy.devin
1db4898cde
Refactor the input parsing of event_enums!
2020-07-13 15:31:15 +02:00
Ragotzy.devin
5e428ac95a
Add support for redacted events
...
* Generate redacted event enums and implement corresponding event structs
* Enable the *EventContent derives to generate redacted events
Most redacted event code is now generated by the *EventContent derive
macro. The exception are any content structs with the custom_redaction
attribute. This leaves implementing up to the user.
* Add redact method to Redaction/CustomEventContent
* Add accessor methods for redacted event enums
* Add RedactedEventContent trait and super traits to match EventContent
2020-07-11 14:59:36 +02:00
skim
c19bcaab31
Add get event auth endpoint
2020-07-10 11:36:46 -07:00
Ragotzy.devin
4ff6c6ecbe
Refactor Request/Response's TryFrom impl by generating match stmt
...
... by moving repetitive parts into a macro_rules macro
2020-07-08 01:44:25 +02:00
Julian Tescher
0d055e05d2
Add federation OpenID userinfo API
...
* Add federation OpenID userinfo API
On-behalf-of: Julian Tescher <jatescher@gmail.com>
2020-07-07 12:26:35 -05:00
Ragotzy.devin
39b37e4fab
ruma-events: Feature gate criterion to avoid compilation in CI
2020-07-07 00:00:31 +02:00
gnieto
6fd4b9b8b0
Properly serialize get_tags
Response
...
`get_tags` route response was adding the `tags` property twice, which is
not the expected behaviour. This is an example of the previous
serialization of the `get_tags` route:
`{"tags":{"tags":{"u.example":{"order":0.55},"u.another":{"order":0.11}}}}`
The new serialization removes the outer `tags` property.
2020-07-05 13:20:47 +02:00
Jonas Platte
9ecc7c11cf
Add a constructor for get_message_events::Request
2020-07-03 22:06:47 +02:00
Jonas Platte
ba95fd6c4e
Add a constructor for create_room::Request
2020-07-03 22:03:15 +02:00
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