mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-06-19 15:44:11 -04:00
Allow rejecting invites
This is done by using the same /leave flow as you would use if you had already accepted the invite and wanted to leave.
This commit is contained in:
parent
9261ef3a15
commit
137fafce4e
8 changed files with 353 additions and 93 deletions
|
@ -308,7 +308,11 @@ class Auth(object):
|
|||
)
|
||||
|
||||
if Membership.JOIN != membership:
|
||||
# JOIN is the only action you can perform if you're not in the room
|
||||
if (caller_invited
|
||||
and Membership.LEAVE == membership
|
||||
and target_user_id == event.user_id):
|
||||
return True
|
||||
|
||||
if not caller_in_room: # caller isn't joined
|
||||
raise AuthError(
|
||||
403,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue