From 74d42f01423acefdb88e3727d61530f371b108bc Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Tue, 20 Oct 2015 11:08:22 +0100 Subject: [PATCH] Allow rejecting invitations --- specification/client_server_api.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/specification/client_server_api.rst b/specification/client_server_api.rst index c25248f8..791c1f4a 100644 --- a/specification/client_server_api.rst +++ b/specification/client_server_api.rst @@ -905,6 +905,11 @@ room. There are several states in which a user may be, in relation to a room: - Joined (the user can send and receive events in the room) - Banned (the user is not allowed to join the room) +There is an exception to the requirement that a user join a room before sending +events to it: users may send an ``m.room.member`` event to a room with +``content.membership`` set to ``leave`` to reject an invitation if they have +currently been invited to a room but have not joined it. + Some rooms require that users be invited to it before they can join; others allow anyone to join. Whether a given room is an "invite-only" room is determined by the room config key ``m.room.join_rules``. It can have one of the @@ -931,8 +936,11 @@ Leaving rooms A user can leave a room to stop receiving events for that room. A user must -have joined the room before they are eligible to leave the room. If the room is -an "invite-only" room, they will need to be re-invited before they can re-join +have been invited to or have joined the room before they are eligible to leave +the room. Leaving a room to which the user has been invited rejects the invite. + +Whether or not they actually joined the room, if the room is +an "invite-only" room they will need to be re-invited before they can re-join the room. To leave a room, a request should be made to |/rooms//leave|_ with::