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>pull/1237/head
parent
a6990ff27c
commit
e406bd94f6
@ -0,0 +1 @@
|
|||||||
|
Add `m.read.private` receipts, as per [MSC2285](https://github.com/matrix-org/matrix-spec-proposals/pull/2285).
|
||||||
@ -0,0 +1 @@
|
|||||||
|
Make `m.fully_read` optional on `/read_markers`, as per [MSC2285](https://github.com/matrix-org/matrix-spec-proposals/pull/2285).
|
||||||
@ -0,0 +1 @@
|
|||||||
|
Allow `m.fully_read` markers to be set from `/receipts`, as per [MSC2285](https://github.com/matrix-org/matrix-spec-proposals/pull/2285).
|
||||||
@ -1,49 +1,54 @@
|
|||||||
{
|
type: object
|
||||||
"type": "object",
|
title: Receipt Event
|
||||||
"title": "Receipt Event",
|
description: Informs the client of new receipts.
|
||||||
"description": "Informs the client of new receipts.",
|
x-changedInMatrixVersion:
|
||||||
"allOf": [{
|
1.4: |
|
||||||
"$ref": "core-event-schema/event.yaml"
|
Added `m.read.private` receipts to the event's `content`.
|
||||||
}],
|
allOf:
|
||||||
"properties": {
|
- $ref: "core-event-schema/event.yaml"
|
||||||
"content": {
|
properties:
|
||||||
"type": "object",
|
content:
|
||||||
"patternProperties": {
|
type: object
|
||||||
"^\\$": {
|
patternProperties:
|
||||||
"type": "object",
|
"^\\$":
|
||||||
"x-pattern": "$EVENT_ID",
|
type: object
|
||||||
"title": "Receipts",
|
x-pattern: "$EVENT_ID"
|
||||||
"description": "The mapping of event ID to a collection of receipts for this event ID. The event ID is the ID of the event being acknowledged and *not* an ID for the receipt itself.",
|
title: Receipts
|
||||||
"properties": {
|
description: |-
|
||||||
"m.read": {
|
The mapping of event ID to a collection of receipts for this
|
||||||
"type": "object",
|
event ID. The event ID is the ID of the event being acknowledged
|
||||||
"title": "Users",
|
and *not* an ID for the receipt itself.
|
||||||
"description": "A collection of users who have sent `m.read` receipts for this event.",
|
properties:
|
||||||
"patternProperties": {
|
"m.read":
|
||||||
"^@": {
|
type: object
|
||||||
"type": "object",
|
title: Users
|
||||||
"title": "Receipt",
|
description: |-
|
||||||
"description": "The mapping of user ID to receipt. The user ID is the entity who sent this receipt.",
|
A collection of users who have sent `m.read` receipts for
|
||||||
"x-pattern": "$USER_ID",
|
this event.
|
||||||
"properties": {
|
patternProperties:
|
||||||
"ts": {
|
"^@": &receiptUserMap
|
||||||
"type": "integer",
|
type: object
|
||||||
"format": "int64",
|
title: Receipt
|
||||||
"description": "The timestamp the receipt was sent at."
|
description: |-
|
||||||
}
|
The mapping of user ID to receipt. The user ID is the
|
||||||
}
|
entity who sent this receipt.
|
||||||
}
|
x-pattern: "$USER_ID"
|
||||||
}
|
properties:
|
||||||
}
|
ts:
|
||||||
}
|
type: integer
|
||||||
}
|
format: int64
|
||||||
},
|
description: The timestamp the receipt was sent at.
|
||||||
"additionalProperties": false
|
"m.read.private":
|
||||||
},
|
type: object
|
||||||
"type": {
|
title: Own User
|
||||||
"type": "string",
|
description: |-
|
||||||
"enum": ["m.receipt"]
|
Similar to `m.read`, the users who have sent `m.read.private`
|
||||||
}
|
receipts for this event. Due to the nature of private read
|
||||||
},
|
receipts, this should only ever have the current user's ID.
|
||||||
"required": ["type", "content"]
|
patternProperties:
|
||||||
}
|
"^@": *receiptUserMap
|
||||||
|
additionalProperties: false
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
enum: ["m.receipt", "m.receipt.private"]
|
||||||
|
required: ["type", "content"]
|
||||||
|
|||||||
Loading…
Reference in New Issue