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/event-schemas/schema/v1/m.room.member

58 lines
2.3 KiB
Plaintext

{
"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-event-schema/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", "null"],
"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"]
},
"invite_room_state": {
"type": "array",
"description": "A subset of the state of the room at the time of the invite, if ``membership`` is ``invite``",
"items": {
"type": "object",
"title": "StateEvent",
"description": "A stripped down state event, with only the ``type``, ``state_key`` and ``content`` keys.",
"properties": {
"type": {
"type": "string"
},
"state_key": {
"type": "string"
},
"content": {
"type": "object"
}
}
}
}
}
}