From 7887d4628b59951f8c71ad0fe6d89c606ae47bbf Mon Sep 17 00:00:00 2001 From: Logan Devine Date: Sat, 9 May 2026 09:56:30 -0700 Subject: [PATCH] split mutual rooms into its own module, add `added-in` line --- content/client-server-api/_index.md | 19 ++----------------- .../client-server-api/modules/mutual_rooms.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 content/client-server-api/modules/mutual_rooms.md diff --git a/content/client-server-api/_index.md b/content/client-server-api/_index.md index cb7087b9..ed7e1e9f 100644 --- a/content/client-server-api/_index.md +++ b/content/client-server-api/_index.md @@ -4233,23 +4233,6 @@ users, they should include the display name and avatar URL fields in these events so that clients already have these details to hand, and do not have to perform extra round trips to query it. -### Mutual Rooms - -{{% http-api spec="client-server" api="mutual_rooms" %}} - -#### Server behaviour - -The server may decide that the response to this endpoint is too large, and only return a -subset of the results. In this case, the server should populate the optional field `next_batch` -with an [opaque identifier](/appendices/#opaque-identifiers). The client may then supply -the identifier as the `from` query parameter in a subsequent request, along with the original -`user_id`, to fetch the next batch of responses. This will continue until the server no longer -inserts `next_batch`, meaning there are no further results. - -Batch tokens generated by this endpoint SHOULD be valid for at least 10 minutes, after which, -tokens can expire. Expired tokens SHOULD be handled similar to invalid tokens, and return -a 400 response. - ## Modules Modules are parts of the Client-Server API which are not universal to @@ -4319,6 +4302,7 @@ that profile. | [Third-party Networks](#third-party-networks) | Optional | Optional | Optional | Optional | Optional | | [Threading](#threading) | Optional | Optional | Optional | Optional | Optional | | [Invite permission](#invite-permission) | Optional | Optional | Optional | Optional | Optional | +| [Mutual Rooms](#mutual-rooms) | Optional | Optional | Optional | Optional | Optional | *Please see each module for more details on what clients need to implement.* @@ -4409,3 +4393,4 @@ systems. {{% cs-module name="Recently used emoji" filename="recent_emoji" %}} {{% cs-module name="Threading" filename="threading" %}} {{% cs-module name="Reference relations" filename="reference_relations" %}} +{{% cs-module name="Mutual Rooms" filename="mutual_rooms" %}} diff --git a/content/client-server-api/modules/mutual_rooms.md b/content/client-server-api/modules/mutual_rooms.md new file mode 100644 index 00000000..162e9c71 --- /dev/null +++ b/content/client-server-api/modules/mutual_rooms.md @@ -0,0 +1,19 @@ +### Mutual Rooms + +{{% added-in v="1.19" %}} + +{{% http-api spec="client-server" api="mutual_rooms" %}} + +#### Server behaviour + +The server may decide that the response to this endpoint is too large, and only return a +subset of the results. In this case, the server should populate the optional field `next_batch` +with an [opaque identifier](/appendices/#opaque-identifiers). The client may then supply +the identifier as the `from` query parameter in a subsequent request, along with the original +`user_id`, to fetch the next batch of responses. This will continue until the server no longer +inserts `next_batch`, meaning there are no further results. + +Batch tokens generated by this endpoint SHOULD be valid for at least 10 minutes, after which, +tokens can expire. Expired tokens SHOULD be handled similar to invalid tokens, and return +a 400 response. When a client uses batch tokens, servers MAY omit rooms that the user joined +after the first token was generated.