forked from matrix-org/matrix-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spec MSC2285: Private read receipts (matrix-org#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 <[email protected]> Co-authored-by: Matthew Hodgson <[email protected]>
- Loading branch information
Showing
10 changed files
with
146 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add `m.read.private` receipts, as per [MSC2285](https://github.com/matrix-org/matrix-spec-proposals/pull/2285). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Make `m.fully_read` optional on `/read_markers`, as per [MSC2285](https://github.com/matrix-org/matrix-spec-proposals/pull/2285). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,54 @@ | ||
{ | ||
"type": "object", | ||
"title": "Receipt Event", | ||
"description": "Informs the client of new receipts.", | ||
"allOf": [{ | ||
"$ref": "core-event-schema/event.yaml" | ||
}], | ||
"properties": { | ||
"content": { | ||
"type": "object", | ||
"patternProperties": { | ||
"^\\$": { | ||
"type": "object", | ||
"x-pattern": "$EVENT_ID", | ||
"title": "Receipts", | ||
"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.", | ||
"properties": { | ||
"m.read": { | ||
"type": "object", | ||
"title": "Users", | ||
"description": "A collection of users who have sent `m.read` receipts for this event.", | ||
"patternProperties": { | ||
"^@": { | ||
"type": "object", | ||
"title": "Receipt", | ||
"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 | ||
}, | ||
"type": { | ||
"type": "string", | ||
"enum": ["m.receipt"] | ||
} | ||
}, | ||
"required": ["type", "content"] | ||
} | ||
type: object | ||
title: Receipt Event | ||
description: Informs the client of new receipts. | ||
x-changedInMatrixVersion: | ||
1.4: | | ||
Added `m.read.private` receipts to the event's `content`. | ||
allOf: | ||
- $ref: "core-event-schema/event.yaml" | ||
properties: | ||
content: | ||
type: object | ||
patternProperties: | ||
"^\\$": | ||
type: object | ||
x-pattern: "$EVENT_ID" | ||
title: Receipts | ||
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. | ||
properties: | ||
"m.read": | ||
type: object | ||
title: Users | ||
description: |- | ||
A collection of users who have sent `m.read` receipts for | ||
this event. | ||
patternProperties: | ||
"^@": &receiptUserMap | ||
type: object | ||
title: Receipt | ||
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. | ||
"m.read.private": | ||
type: object | ||
title: Own User | ||
description: |- | ||
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. | ||
patternProperties: | ||
"^@": *receiptUserMap | ||
additionalProperties: false | ||
type: | ||
type: string | ||
enum: ["m.receipt", "m.receipt.private"] | ||
required: ["type", "content"] |