Skip to content

Commit

Permalink
Fix schema of m.receipt EDU (#1636)
Browse files Browse the repository at this point in the history
It was missing a nesting level for the user ID -> user read receipt map.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
  • Loading branch information
zecakeh committed Sep 19, 2023
1 parent 46447e0 commit 96f88e0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 34 deletions.
1 change: 1 addition & 0 deletions changelogs/server_server/newsfragments/1636.clarification
@@ -0,0 +1 @@
Fix schema of `m.receipt` EDU.
72 changes: 38 additions & 34 deletions data/api/server-server/definitions/event-schemas/m.receipt.yaml
Expand Up @@ -41,41 +41,45 @@ allOf:
# on. At that point, m.read can become optional (maybe).
"m.read":
type: object
description: Read receipts for users in the room.
title: User Read Receipt
properties:
event_ids:
type: array
description: |-
The extremity event IDs that the user has read up to.
minItems: 1
maxItems: 1
items:
type: string
example: ['$read_this_event:matrix.org']
data:
type: object
description: Metadata for the read receipt.
title: Read Receipt Metadata
properties:
ts:
type: integer
format: int64
description: |-
A POSIX timestamp in milliseconds for when the user read
the event specified in the read receipt.
example: 1533358089009
thread_id:
type: string
x-addedInMatrixVersion: "1.4"
description: |-
Read receipts for users in the room. The string key is the user
ID the receipt belongs to.
additionalProperties:
type: object
title: User Read Receipt
properties:
event_ids:
type: array
description: |-
The extremity event IDs that the user has read up to.
minItems: 1
maxItems: 1
items:
type: string
example: ['$read_this_event:matrix.org']
data:
type: object
description: Metadata for the read receipt.
title: Read Receipt Metadata
properties:
ts:
type: integer
format: int64
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: "$threadroot"
required: ['ts']
required: ['event_ids', 'data']
A POSIX timestamp in milliseconds for when the user read
the event specified in the read receipt.
example: 1533358089009
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: "$threadroot"
required: ['ts']
required: ['event_ids', 'data']
required: ['m.read']
example: {
"!some_room:example.org": {
Expand Down

0 comments on commit 96f88e0

Please sign in to comment.