547 Commits

Author SHA1 Message Date
Benjamin Bouvier
75e8829bec client-api: RoomSummary::heroes must be OwnedUserIds, in fact
This is imprecise from the spec wording [1], apart from a hint [2], but
these should really be user ids. In practice, this is what Synapse
returns too

[1]https://spec.matrix.org/latest/client-server-api/#_matrixclientv3sync_roomsummary
[2] "The list must never include the client’s own user ID."
2024-05-23 19:41:00 +02:00
Ivan Enderlin
ee5e6b8c9e
feat(client-api): v4::SyncRequestList has a new include_heroes field (#1818) 2024-05-23 09:57:13 +00:00
Ivan Enderlin
1c1cfe9a7e
feat: Add heros support for sliding sync room. (#1691)
This patch is only based on https://github.com/matrix-org/sliding-sync/
pull/304 since the specification wasn't updated. I'm basically guessing
what a request and a response _should_ look like:

* `RoomSubscription` gains a new field: `include_heros`,
* `SlidingSyncRoom` gains a new field: `heros`,
* `SlidingSyncRoomHero` is a new type.
2024-05-22 08:14:11 +00:00
Damir Jelić
1c4f26af74 client-api: Add support for MSC4108 OIDC sign in and E2EE set up via QR code 2024-05-14 18:18:15 +02:00
Kévin Commaille
2b986e1226 chore: Fix new rustfmt errors 2024-05-12 15:49:28 +02:00
Kévin Commaille
d6c4533b7d chore: Fix new warnings 2024-05-12 15:49:28 +02:00
Kévin Commaille
00a332b037
Release ruma-client-api 0.18.0 2024-05-09 12:53:11 +02:00
Kévin Commaille
10c7e59c57 client-api: Add helper methods to convert SystemTime from/to a HTTP date 2024-05-08 19:09:13 +02:00
Kévin Commaille
b4d0ab42a3
client-api: Make get_uiaa_fallback::v3::Response an enum
It is now either a redirect or a HTML page,
with the proper status code, headers and body.
2024-05-07 17:22:17 +02:00
Kévin Commaille
fcaf4bd54a client-api: Return proper status code for SSO login endpoints 2024-05-07 08:59:08 +02:00
Kévin Commaille
cae00cfff8 client-api: Return proper content type in login_fallback::Response 2024-05-07 08:49:16 +02:00
Benjamin Lee
16de61357e client-api: Don't skip the events field serializing timeline in sync response
This field is marked as required in the spec. Before
7caa8f2739e38c43effd8a215e788cc1aece13c8, the fact that we had it marked
as `skip_serializing_if` didn't really matter, because we were skipping
the entire timeline object when `events` was empty. Now that we can
serialize timelines with zero events, we always need to include the
field.
2024-05-05 03:09:56 -04:00
Benjamin Lee
3f67772dd3 client-api: Don't skip all no-event timelines serializing sync response
There are some cases where a timeline can have zero events but should
still be included in the api response. For example, when calling `/sync`
with a filter that rejects all events after `since`, but does not
necessarily reject all events in the room's history, the response should
include a `prev_batch` field so that the client can search for earlier
events matching the filter using `/messages`.
2024-05-05 03:09:56 -04:00
Kévin Commaille
19a29934fa client-api: Add unstable support for animated thumbnails
According to MSC2705
2024-04-27 16:15:21 +02:00
Benjamin Bouvier
cc44459117
client-api: add unstable MSC3266 support (room summary) (#1776)
This implements experimental support for MSC3266 for getting a room summary, which is really nice to get room previews even for rooms one is not part of.
2024-04-21 12:47:22 +02:00
Matthias Ahouansou
becc4ac0b3 federation-api: add unstable support for MSC3843 2024-04-17 14:51:23 +02:00
strawberry
047764bc15 client-api: add unstable MSC4121 support (moderator role definition)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-07 16:58:07 +02:00
Kévin Commaille
31dc4a2dfb
client-api: Add support for the Retry-After header
According to MSC4041 / Matrix 1.10

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2024-04-07 13:52:43 +00:00
Jonas Platte
4a02b97aa3
Update website URL 2024-04-04 13:20:58 +02:00
Kévin Commaille
917584e0ca client-api: Move Error authenticate field to ErrorKind::Forbidden 2024-03-31 21:04:18 +02:00
Kévin Commaille
4f4085a013 client-api: Make Error non-exhaustive 2024-03-31 21:04:18 +02:00
strawberry
7b0056b3ab client-api: make recursion_depth field public
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-27 18:07:06 +01:00
strawberry
85ecb1b11b client-api: add missing dir field on the relations endpoints
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-27 18:07:06 +01:00
Kévin Commaille
e249f08f4b client-api: Add server support discovery endpoint
According to MSC1929 / Matrix 1.10
2024-03-23 09:34:36 +01:00
Kévin Commaille
1d66031f8b client-api: Add support for recursion on the get_relating_events endpoints
According to MSC3981 / Matrix 1.10
2024-03-23 09:30:06 +01:00
Kévin Commaille
cab3b99ba7 docs: Mark changelog entries for Matrix 1.10 2024-03-22 21:28:39 +01:00
Kévin Commaille
0e7c91d789 docs: Point links to v1.10 of the spec 2024-03-22 21:28:39 +01:00
Matthias Ahouansou
4ffbed0e06 client-api: allow /login to support authentication from appservices 2024-03-13 22:06:58 +01:00
Matthias Ahouansou
93c1605a46 client-api: allow /register to support authentication from appservices 2024-03-13 22:06:58 +01:00
Levitating Pineapple
a57ec8190f Update changelog 2024-03-13 10:11:23 +01:00
Levitating Pineapple
2655624e35 client-api: Update the query parameter of check_registration_token_validity request 2024-03-13 10:11:23 +01:00
strawberry
b2542df2bb client-api: don't require ts request parameter for URL previews
spec does not say this is required and Element Android (legacy)
is a client known to *not* send this query parameter.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-08 23:08:59 +01:00
Kévin Commaille
3997e445b5 client-api: Allow /versions to optionally accept authentication
According to MSC4026.
2024-03-07 12:30:28 +01:00
Kévin Commaille
f24cae17f5 client-api: Add support for local user erasure
According to MSC4025
2024-02-28 20:24:45 +01:00
avdb13
abebde0cf1
client-api: Add optional cookie field to sso_login*::Response 2024-02-23 14:22:49 +00:00
Damir Jelić
b8768c3f19
client-api: Don't require the failures field in the signatures upload response
The field is not marked as required in the spec[1] and at least one homeserver, namely Dendrite, omits the field if it's empty.

[1]: https://spec.matrix.org/unstable/client-server-api/#post_matrixclientv3keyssignaturesupload
2024-02-22 16:17:44 +01:00
strawberry
4d9f754657 client-api: add deprecated login fields to password and appservice login types
`user`, `medium`, and `address` for `m.login.password`
`user` for `m.login.appservice`

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-17 18:22:20 +01:00
Jonas Platte
aa3acd88d2 Add error_kind accessor methods for client-server API errors 2024-01-13 11:16:09 +01:00
Jonas Platte
8d9e96ed76 Simplify known_versions return types
Thanks to clippy for the lint!
2024-01-10 16:12:49 +01:00
Kévin Commaille
4ae2455f80 client-api: Add GET /auth_issuer endpoint from MSC2965 2023-12-26 15:33:36 +01:00
Kévin Commaille
4efca6fba5 docs: Point links to v1.9 of the spec 2023-11-30 14:42:14 +01:00
Jonas Platte
6639c727ae
Merge branch 'ruma-0.9.x' 2023-11-22 20:02:17 +01:00
Jonas Platte
5abb225078
Release ruma-client-api 0.17.4 2023-11-20 22:55:57 +01:00
Benjamin Bouvier
268f206dff
client-api: Use JsOption for avatar field in sliding sync response
The `avatar` field has different semantics whether it's `undefined` (hasn't
changed since previous time) vs `null` (it's now unset). Let's reflect
this in the API of the `SlidingSyncRoom` response. While a public breaking API
change, sliding sync is still considered experimental, so we're not bumping
the main version here.
2023-11-20 22:51:54 +01:00
Benjamin Bouvier
9728f97505
client-api: Use JsOption for avatar field in sliding sync response
The `avatar` field has different semantics whether it's `undefined` (hasn't
changed since previous time) vs `null` (it's now unset). Let's reflect
this in the API of the `SlidingSyncRoom` response. While a public breaking API
change, sliding sync is still considered experimental, so we're not bumping
the main version here.
2023-11-20 22:47:45 +01:00
Jonas Platte
6602782a15
Merge branch 'ruma-0.9.x' 2023-11-16 10:45:30 +01:00
Jonas Platte
8d050d7830
Release ruma-client-api 0.17.3 2023-11-16 10:44:28 +01:00
Jonas Platte
4189dde59e
client-api: Separate docstring into two paragraphs 2023-11-16 10:42:19 +01:00
Jonas Platte
e30360dd4c
client-api: Fix deserialization of claim_keys responses
… without a `failures` field.
2023-11-16 10:41:42 +01:00
Jonas Platte
2aa8745bd3
client-api: Separate docstring into two paragraphs 2023-11-16 10:30:34 +01:00