Allow rejecting invitations

This commit is contained in:
Daniel Wagner-Hall 2015-10-20 11:08:22 +01:00
parent 84a8663019
commit 74d42f0142

View file

@ -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) - Joined (the user can send and receive events in the room)
- Banned (the user is not allowed to join 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 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 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 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 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 have been invited to or have joined the room before they are eligible to leave
an "invite-only" room, they will need to be re-invited before they can re-join 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 the room. To leave a room, a request should be made to
|/rooms/<room_id>/leave|_ with:: |/rooms/<room_id>/leave|_ with::