matrix-spec/event-schemas/schema/v1/m.receipt

46 lines
1.8 KiB
Plaintext
Raw Normal View History

2015-09-08 17:49:14 +02:00
{
"type": "object",
"title": "Receipt Event",
"description": "Informs the client of new receipts.",
"properties": {
"content": {
"type": "object",
"patternProperties": {
2015-09-08 17:51:08 +02:00
"^\\$": {
2015-09-08 17:49:14 +02:00
"type": "object",
"x-pattern": "$EVENT_ID",
"description": "The mapping of event ID to receipt type. The event ID is the ID which the receipts relate to and *not* an ID for the receipt itself. The key in the object is an enum which must be ``read``.",
2015-09-08 17:49:14 +02:00
"additionalProperties": {
"type": "object",
"title": "Users",
2015-09-08 17:49:14 +02:00
"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",
2015-09-08 17:49:14 +02:00
"properties": {
"ts": {
"type": "number",
"description": "The timestamp the receipt was sent at"
}
}
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"type": {
"type": "string",
2015-09-08 17:54:14 +02:00
"enum": ["m.receipt"]
2015-09-08 17:49:14 +02:00
},
"room_id": {
"type": "string"
}
},
"required": ["room_id", "type", "content"]
}