matrix-spec/event-schemas/schema/m.presence
Travis Ralston a488bd5503 Make m.presence match what synapse returns
Considering this is the behaviour that is embedded into most client libraries and the most popular homeserver, it should be adopted as the standard.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2018-03-03 12:12:47 -07:00

46 lines
1.5 KiB
Plaintext

{
"type": "object",
"title": "Presence Event",
"description": "Informs the client of a user's presence state change.",
"allOf": [{
"$ref": "core-event-schema/event.yaml"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string",
"description": "The current avatar URL for this user, if any."
},
"displayname": {
"type": "string",
"description": "The current display name for this user, if any."
},
"last_active_ago": {
"type": "number",
"description": "The last time since this used performed some action, in milliseconds."
},
"presence": {
"type": "string",
"description": "The presence state for this user.",
"enum": ["online", "offline", "unavailable"]
},
"currently_active": {
"type": boolean,
"description": "Whether the user is currently active"
}
},
"required": ["presence"]
},
"type": {
"type": "string",
"enum": ["m.presence"]
},
"sender": {
"type": "string"
}
},
"required": ["sender", "type", "content"]
}