0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-06-29 07:58:19 +02:00

Add missing None check

This commit is contained in:
Erik Johnston 2017-01-11 10:57:03 +00:00
parent 3cb1799347
commit 7b62d0bc70

View file

@ -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)