Skip to content

Commit d82135f

Browse files
committed
Receipts: Add thread_id to the /receipt endpoint
It seems to have been omitted in #1255
1 parent 434f1b0 commit d82135f

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

data/api/client-server/receipts.yaml

+23-1
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,18 @@ paths:
7474
required: true
7575
schema:
7676
type: object
77+
properties:
78+
thread_id:
79+
type: string
80+
x-addedInMatrixVersion: "1.4"
81+
description: |-
82+
The root thread event's ID (or `main`) for which
83+
thread this receipt is intended to be under. If
84+
not specified, the read receipt is *unthreaded*
85+
(default).
7786
example: {
78-
}
87+
"thread_id": "main"
88+
}
7989
responses:
8090
200:
8191
description: The receipt was sent.
@@ -88,5 +98,17 @@ paths:
8898
description: This request was rate-limited.
8999
schema:
90100
"$ref": "definitions/errors/rate_limited.yaml"
101+
400:
102+
description: |-
103+
The `thread_id is not a string, or is empty, or it is provided for
104+
a receipt of type `m.fully_read`, or the `event_id` is not related
105+
to the `thread_id`.
106+
schema:
107+
$ref: "definitions/errors/error.yaml"
108+
examples:
109+
application/json: {
110+
"errcode": "M_INVALID_PARAM",
111+
"error": "thread_id field must be a non-empty string"
112+
}
91113
tags:
92114
- Room participation

0 commit comments

Comments
 (0)