{ "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//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"] } } }