diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-11-20 18:07:26 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-11-20 18:07:26 +0000 |
commit | c6a15f5026035b2bdd62cffaf0e2d70497197d05 (patch) | |
tree | c57fcad9c735e2146cd080f47c1d43252607f4b8 /synapse/api/auth.py | |
parent | Merge pull request #395 from matrix-org/erikj/perspective_limiter (diff) | |
parent | Merge branch 'daniel/forgetrooms' of github.com:matrix-org/synapse into danie... (diff) | |
download | synapse-c6a15f5026035b2bdd62cffaf0e2d70497197d05.tar.xz |
Merge pull request #385 from matrix-org/daniel/forgetrooms
Allow users to forget rooms
Diffstat (limited to 'synapse/api/auth.py')
-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 4a13f7e2e1..4fdc779b4b 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 |