2476 Commits

Author SHA1 Message Date
Jonas Platte
f2c2f2df2f
common: Don't change fields in thirdparty::Protocol with unstable-synapse-quirks 2020-11-23 19:12:19 +01:00
Jonas Platte
ee4280cea2
events: Allow the url in m.room.avatar to be null / missing
This isn't allowed in any version of the spec, but it's the only way to
unset an avatar and will have to be supported in the future.

C.f. https://github.com/matrix-org/matrix-doc/issues/2006
2020-11-23 14:18:41 +01:00
Jonas Platte
0ae0a89467
events: Remove accidentally copy-pasted docs line 2020-11-23 14:15:54 +01:00
Alejandro Domínguez
d16fd4b2c1 Enable support in power level events for old Synapse events with strings 2020-11-20 14:31:10 +01:00
Alejandro Domínguez
872701dc83 Introduce the unstable-synapse-quirks feature in ruma-events 2020-11-20 14:31:10 +01:00
Alejandro Domínguez
51573238a9 Add function to deserialize BTreeMap with values of numbers and strings to integers 2020-11-20 14:31:10 +01:00
Alejandro Domínguez
0ac2f401f8 Add function to deserialize numbers and strings as an integer 2020-11-20 14:31:10 +01:00
Jonas Platte
d809066c9c
federation-api: Minor fixes to create_join_event 2020-11-18 19:36:32 +01:00
Guillem Nieto
34c4b6c110 Remove PduStub
Removed PduStub because is not used anymore on any public endpoint.
2020-11-18 19:30:23 +01:00
Guillem Nieto
b168c38d83 Use Pdu on create_join_event endpoints
Sending requests to this endpoints to Synapse/Dendrite homeservers leads
to some deserialization errors.

After claryfing it
(https://github.com/matrix-org/matrix-doc/issues/2856), `room_id` and
`event_id` fields are expected to appear on request's body and also on
path params. It seems that there's some initiative, in any case, to
remove the parameters from path:
https://github.com/matrix-org/matrix-doc/issues/2330
2020-11-18 19:30:23 +01:00
Jonas Platte
9a4206b1b2
events: Add a test for edit deserialization without unstable-pre-spec 2020-11-18 14:13:15 +01:00
Jonas Platte
0f64a6ea39
Fix new clippy warnings 2020-11-10 16:48:35 +01:00
Jonas Platte
f2a8dd7a55
signatures: Simplify key version validity check 2020-11-10 14:21:03 +01:00
Damir Jelić
71a8d9d6ce events: Add support for the m.reaction event type 2020-11-10 13:30:52 +01:00
Damir Jelić
cf7d4b40e1 events: Add support for the new relation types 2020-11-10 13:30:52 +01:00
Jonas Platte
a5c08c8fde
identifiers: Refactor Error enum 2020-11-08 19:32:09 +01:00
Jonas Platte
374603f51c
Rename SigningKeyId to ServerSigningKeyId 2020-11-08 19:24:48 +01:00
gnieto
c6ef3a06fa
appservice-api: Fix push_events::v1::Request serialization
Change `push_events::v1::Request` serialization to prevent flattening
of the event property into the request body.
2020-11-08 19:17:34 +01:00
Isaiah Inuwa
b793a790db
Rename ServerKeyId to SigningKeyId 2020-11-08 13:21:55 +01:00
Damir Jelić
8f710a371b
events: Use a custom event for the custom event tests. 2020-11-05 21:15:54 +01:00
Jonas Platte
e02d76f4b0
Remove FIXME comment
Turned out making FilterDefinition::ignore_all() const doesn't help.
2020-11-05 21:14:56 +01:00
Jonas Platte
6bfa391104
Improve docs for lazy loading 2020-11-05 21:13:53 +01:00
Jonas Platte
d476046443
Disable clippy::large_enum_variant lint on event enums 2020-11-02 00:29:47 +01:00
Jonas Platte
dd6446822b
Derive PartialEq and Eq for all string-wrapping enums 2020-11-02 00:29:47 +01:00
Jonas Platte
d34a270919
Allow custom values for more enums 2020-11-02 00:29:47 +01:00
Jonas Platte
70a12864ef
Use new macros for existing future-compatible enums 2020-11-02 00:29:41 +01:00
Jonas Platte
1f8e8c2e93
common-macros: Add derive macros for string-wrapping enums 2020-11-02 00:29:41 +01:00
Jonas Platte
e91a7b7cbf
common-macros: Copy RenameRule from serde
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Co-authored-by: Richard Dodd <richard.o.dodd@gmail.com>
Co-authored-by: vinoca <vinoca@vinoca.org>
2020-11-02 00:29:40 +01:00
Jonas Platte
6ac89bb293
common-macros: Reorder dependencies 2020-11-02 00:29:40 +01:00
Devin Ragotzy
c15382ca41
api-macros: Make Response header fields override any defaults 2020-11-01 14:04:34 +01:00
Jonas Platte
60bd16ccfc
Add contrib/ide/vscode/settings.json 2020-10-29 21:10:19 +01:00
Jonas Platte
6ba16b3ddb
signatures: Re-export canonical json types 2020-10-29 21:02:01 +01:00
Jonas Platte
6877115109
signatures: Update docs 2020-10-29 21:01:43 +01:00
Devin Ragotzy
bc43e94d7e
Add helper methods for CanonicalJsonObject construction 2020-10-29 19:31:23 +01:00
Devin Ragotzy
c04a9e71c5
Add the unstable-pre-spec feature to the federation-api crate 2020-10-28 14:54:01 +01:00
gnieto
3f7c6f6bea
Fix deserialization for some Filter types
This was a regression in some recent changes on `FilterDefinition` and
`RoomFilter` which removed some `Option`s.

The current structure skips some fields when the structure is
serialized, but it wrongly required those fields on deserialization
(due to the lack of serde's default attribute).
2020-10-26 23:54:35 +01:00
poljar
c0eee62431
client-api: Fix the signing key uploading endpoint
Uploading signing keys requires auth using UIAA, the error has thus been
changed to the UiaaResponse.

Uploading signing keys also fails under Synapse when using the /r0 API
path, using the /unstable path succeeds.
2020-10-26 13:16:34 +01:00
Jonas Platte
f2a78babbd
Avoid creating owned strings in deserialization where not necessary 2020-10-26 01:52:51 +01:00
Jonas Platte
62d5108633
client-api: Make the ErrorKind enum future-compatible 2020-10-26 00:56:25 +01:00
Jonas Platte
3b3ef1cb75
Remove test_ prefix from lots of test functions 2020-10-25 23:11:08 +01:00
Jonas Platte
64b9c646d1
identifiers: Revert serde rename from Cargo.toml 2020-10-24 19:27:50 +02:00
Jonas Platte
e1975c2035
Be more consistent about whitespace 2020-10-24 00:44:01 +02:00
Jonas Platte
8ceb57ed1d
Link to new #ruma-dev room in CONTRIBUTING.md 2020-10-22 19:17:21 +02:00
poljar
db2f580329
client-api: Make the CrossSigningKey serialization invertible 2020-10-22 16:21:27 +02:00
Jonas Platte
97f3e31ad8
Improve documentation for content_disposition fields 2020-10-21 14:38:36 +02:00
Jonas Platte
7d10df7177
Support &RawJsonValue in Outgoing derive 2020-10-20 02:22:12 +02:00
Jonas Platte
3853a36ff6
Support more unusual reference types in Outgoing derive 2020-10-20 02:20:29 +02:00
Jonas Platte
16dd20d64e
Improve docs for impl Display for CanonicalJsonValue
and extract the doctest into a regular test.
2020-10-19 17:56:30 +02:00
Timo Kösters
f85d98f557
client-api: Implement Default for incoming event filter types 2020-10-18 11:31:44 +02:00
Timo Kösters
6f821835f1
federation-api: Wrap events jn get_missing_events in Raw 2020-10-18 11:25:24 +02:00