diff --git a/changelogs/server_server/newsfragments/1636.clarification b/changelogs/server_server/newsfragments/1636.clarification new file mode 100644 index 00000000..9f39a014 --- /dev/null +++ b/changelogs/server_server/newsfragments/1636.clarification @@ -0,0 +1 @@ +Fix schema of `m.receipt` EDU. diff --git a/data/api/server-server/definitions/event-schemas/m.receipt.yaml b/data/api/server-server/definitions/event-schemas/m.receipt.yaml index bbc3ac67..0b064ff1 100644 --- a/data/api/server-server/definitions/event-schemas/m.receipt.yaml +++ b/data/api/server-server/definitions/event-schemas/m.receipt.yaml @@ -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": {