summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-01-11 10:57:42 +0000
committerErik Johnston <erik@matrix.org>2017-01-11 10:57:42 +0000
commit10f7bfe8974d528ed9c4500c382bafa27eeadfbf (patch)
tree44e8a97451600e08d03c7f402aea9d4423e93ad5
parentPEP8 (diff)
parentAdd missing None check (diff)
downloadsynapse-10f7bfe8974d528ed9c4500c382bafa27eeadfbf.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
-rw-r--r--CHANGES.rst1
-rw-r--r--synapse/handlers/room_member.py11
2 files changed, 7 insertions, 5 deletions
diff --git a/CHANGES.rst b/CHANGES.rst

index 68e9d8c671..9106134b46 100644 --- a/CHANGES.rst +++ b/CHANGES.rst
@@ -30,6 +30,7 @@ Changes in synapse v0.18.6 (2017-01-06) Bug fixes: * Fix bug when checking if a guest user is allowed to join a room (PR #1772) + Thanks to Patrik Oldsberg for diagnosing and the fix! Changes in synapse v0.18.6-rc3 (2017-01-05) diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index 8a76469b77..b2806555cf 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py
@@ -232,11 +232,12 @@ class RoomMemberHandler(BaseHandler): errcode=Codes.BAD_STATE ) - same_content = content == old_state.content - same_membership = old_membership == effective_membership_state - same_sender = requester.user.to_string() == old_state.sender - if same_sender and same_membership and same_content: - defer.returnValue(old_state) + if old_state: + same_content = content == old_state.content + same_membership = old_membership == effective_membership_state + same_sender = requester.user.to_string() == old_state.sender + if same_sender and same_membership and same_content: + defer.returnValue(old_state) is_host_in_room = yield self._is_host_in_room(current_state_ids)