Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receipts: Add thread_id to the /receipt endpoint #1261

Merged
merged 4 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `thread_id` to the `/receipt` endpoint, as per [MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771)
24 changes: 23 additions & 1 deletion data/api/client-server/receipts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,18 @@ paths:
required: true
schema:
type: object
properties:
thread_id:
type: string
x-addedInMatrixVersion: "1.4"
description: |-
The root thread event's ID (or `main`) for which
thread this receipt is intended to be under. If
not specified, the read receipt is *unthreaded*
(default).
example: {
}
"thread_id": "main"
}
responses:
200:
description: The receipt was sent.
Expand All @@ -88,5 +98,17 @@ paths:
description: This request was rate-limited.
schema:
"$ref": "definitions/errors/rate_limited.yaml"
400:
description: |-
The `thread_id` is not a string, or is empty, or it is provided for
a receipt of type `m.fully_read`, or the `event_id` is not related
to the `thread_id`.
zecakeh marked this conversation as resolved.
Show resolved Hide resolved
schema:
$ref: "definitions/errors/error.yaml"
examples:
application/json: {
"errcode": "M_INVALID_PARAM",
"error": "thread_id field must be a non-empty string"
}
tags:
- Room participation