diff options
author | Erik Johnston <erik@matrix.org> | 2014-11-27 17:16:24 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-11-27 17:16:24 +0000 |
commit | 5e26f6f3ae12d343bd2e1ba9b1b27fc1f7991fde (patch) | |
tree | 288cb19c083b7bc8c7d6ca4b5eed2f8484421bbf /synapse/api/auth.py | |
parent | Add a workaround for bug where some initial join events don't reference creat... (diff) | |
parent | Bump version and changelog (diff) | |
download | synapse-5e26f6f3ae12d343bd2e1ba9b1b27fc1f7991fde.tar.xz |
Merge branch 'release-v0.5.3' of github.com:matrix-org/synapse v0.5.3
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index fb911e51a6..2b0475543d 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -202,7 +202,10 @@ class Auth(object): # Invites are valid iff caller is in the room and target isn't. if not caller_in_room: # caller isn't joined - raise AuthError(403, "You are not in room %s." % event.room_id) + raise AuthError( + 403, + "%s not in room %s." % (event.user_id, event.room_id,) + ) elif target_in_room: # the target is already in the room. raise AuthError(403, "%s is already in the room." % target_user_id) @@ -225,7 +228,10 @@ class Auth(object): # TODO (erikj): Implement kicks. if not caller_in_room: # trying to leave a room you aren't joined - raise AuthError(403, "You are not in room %s." % event.room_id) + raise AuthError( + 403, + "%s not in room %s." % (target_user_id, event.room_id,) + ) elif target_user_id != event.user_id: if kick_level: kick_level = int(kick_level) |