{ "$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\nthe membership APIs (``/rooms//invite`` etc) when performing\nmembership actions rather than adjusting the state directly as there are a\nrestricted set of valid transformations. For example, user A cannot force\nuser B to join a room, and trying to force this state change directly will\nfail.", "allOf": [{ "$ref": "core#/definitions/state_event" }], "properties": { "content": { "type": "object", "properties": { "membership": { "type": "string", "enum": ["invite","join","knock","leave","ban"] }, "avatar_url": { "type": "string" }, "displayname": { "type": "string" } }, "required": ["membership"] }, "state_key": { "type": "string" }, "type": { "type": "string", "enum": ["m.room.member"] } } }