diff options
author | Daniel Wagner-Hall <dawagner@gmail.com> | 2015-11-17 17:17:30 -0500 |
---|---|---|
committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2015-11-17 17:17:30 -0500 |
commit | ba26eb3d5d487edb90c21db7efec631b80adf24b (patch) | |
tree | 443ada28bdf0a40c2ea24a60b02e6b27ff1d5f79 /synapse/api | |
parent | Merge pull request #384 from matrix-org/erikj/shorter_retries (diff) | |
download | synapse-ba26eb3d5d487edb90c21db7efec631b80adf24b.tar.xz |
Allow users to forget rooms
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/auth.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 8111b34428..6eaa1150a3 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -207,6 +207,13 @@ class Auth(object): user_id, room_id )) + if membership == Membership.LEAVE: + forgot = yield self.store.did_forget(user_id, room_id) + if forgot: + raise AuthError(403, "User %s not in room %s" % ( + user_id, room_id + )) + defer.returnValue(member) @defer.inlineCallbacks |