Spec MSC2285: Private read receipts (#1216)

* Convert `m.receipt.yaml` to traditional YAML

* Spec MSC2285 (private read receipts)

* Add some obvious copyright headers

* Add changelog entries

* Appease the linter

Apparently it hates it when you do this.

* Allow m.fully_read on /receipts

* Apply suggestions from code review

Co-authored-by: Matthew Hodgson <matthew@matrix.org>

Co-authored-by: Matthew Hodgson <matthew@matrix.org>
This commit is contained in:
Travis Ralston 2022-09-12 16:34:51 -06:00 committed by GitHub
parent a6990ff27c
commit e406bd94f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 146 additions and 66 deletions

View file

@ -1,4 +1,5 @@
# Copyright 2018 New Vector Ltd
# Copyright 2022 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -56,6 +57,9 @@ paths:
The event ID the read marker should be located at. The
event MUST belong to the room.
example: "$somewhere:example.org"
x-changedInMatrixVersion:
1.4: |
This property is no longer required.
"m.read":
type: string
description: |-
@ -63,11 +67,18 @@ paths:
equivalent to calling `/receipt/m.read/$elsewhere:example.org`
and is provided here to save that extra call.
example: "$elsewhere:example.org"
required: ['m.fully_read']
"m.read.private":
x-addedInMatrixVersion: "1.4"
type: string
description: |-
The event ID to set the *private* read receipt location at. This
equivalent to calling `/receipt/m.read.private/$elsewhere:example.org`
and is provided here to save that extra call.
example: "$elsewhere:example.org"
responses:
200:
description: |-
The read marker, and read receipt if provided, have been updated.
The read marker, and read receipt(s) if provided, have been updated.
schema:
type: object
properties: {}

View file

@ -1,4 +1,5 @@
# Copyright 2016 OpenMarket Ltd
# Copyright 2022 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -46,10 +47,19 @@ paths:
- in: path
type: string
name: receiptType
description: The type of receipt to send.
description: |-
The type of receipt to send. This can also be `m.fully_read` as an
alternative to [`/read_makers`](/client-server-api/#post_matrixclientv3roomsroomidread_markers).
Note that `m.fully_read` does not appear under `m.receipt`: this endpoint
effectively calls `/read_markers` internally when presented with a receipt
type of `m.fully_read`.
required: true
x-example: "m.read"
enum: ["m.read"]
x-changedInMatrixVersion:
1.4: |
Allow `m.read.private` receipts and `m.fully_read` markers to be set.
enum: ["m.read", "m.read.private", "m.fully_read"]
- in: path
type: string
name: eventId