You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
matrix-spec-proposals/event-schemas/schema/v1/m.room.member

39 lines
1.6 KiB
Plaintext

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "The current membership state of a user in the room.",
"description": "Adjusts the membership state for a user in a room. It is preferable to use the membership APIs (``/rooms/<room id>/invite`` etc) when performing membership actions rather than adjusting the state directly as there are a restricted set of valid transformations. For example, user A cannot force user B to join a room, and trying to force this state change directly will fail.",
"allOf": [{
"$ref": "core/state_event.json"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"membership": {
"type": "string",
"description": "The membership state of the user.",
"enum": ["invite","join","knock","leave","ban"]
},
"avatar_url": {
"type": "string",
"description": "The avatar URL for this user, if any. This is added by the homeserver."
},
"displayname": {
"type": "string",
"description": "The display name for this user, if any. This is added by the homeserver."
}
},
"required": ["membership"]
},
"state_key": {
"type": "string",
"description": "The ``user_id`` this membership event relates to."
},
"type": {
"type": "string",
"enum": ["m.room.member"]
}
}
}