Skip to content

Commit 75afe34

Browse files
committed
Clarify what is returned by the API.
1 parent 8ef8232 commit 75afe34

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

proposals/3856-threads-list-api.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@ threads where the user sent the root message and has not yet replied.
4747
### Client-Server endpoint
4848

4949
A new endpoint is proposed to query for threads in a room. This endpoint requires
50-
authentication and is subject to rate-limiting. This endpoint includes
50+
authentication and is subject to rate-limiting.
51+
52+
The endpoint returns events, which represent thread roots and includes
5153
[bundled aggregations](https://spec.matrix.org/v1.3/client-server-api/#aggregations)
52-
in the response.
54+
in the response (which includes the "latest event" of each thread, see
55+
[MSC3440](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/3440-threading-via-relations.md#event-format)
56+
for the format of bundled aggregations of threads).
5357

54-
The returned threads are ordered by the most recently updated thread.
58+
The returned events are ordered by the latest event of each thread.
5559

5660
#### Request format
5761

@@ -63,9 +67,10 @@ Query Parameters:
6367

6468
* **`include`**: `enum`
6569

66-
Whether to include all threads in the room or only threads which the user has
67-
participated in, meaning that the user has created the root event of the thread
68-
or have created an event with a `m.thread` relation targeting the root.
70+
Whether to include all thread roots in the room or only thread roots which the
71+
user has participated in, meaning that the user has created the root event of
72+
the thread or replied to the thread (they have created an event with a `m.thread`
73+
relation targeting the root event).
6974

7075
One of `[all participated]`. Defaults to `all`.
7176
* **`from`**: `string`
@@ -74,8 +79,8 @@ Query Parameters:
7479
`prev_batch` or `next_batch` token returned by the `/sync` endpoint, or from
7580
an `end` token returned by a previous request to this endpoint.
7681

77-
If it is not provided, the homeserver shall return a list of threads from the
78-
last visible event in the room history for the requesting user.
82+
If it is not provided, the homeserver shall return a list of thread roots starting
83+
from the last visible event in the room history for the requesting user.
7984
* **`limit`**: Optional: a client-defined limit to the maximum
8085
number of threads to return per page. Must be an integer greater than zero.
8186

0 commit comments

Comments
 (0)