Add explicit "elif event.membership == Membership.LEAVE" for clarity

This commit is contained in:
Mark Haines 2015-09-21 14:17:16 +01:00
parent 1e101ed4a4
commit 0c16285989

View File

@ -389,13 +389,14 @@ class MessageHandler(BaseHandler):
if event.membership not in (Membership.JOIN, Membership.LEAVE): if event.membership not in (Membership.JOIN, Membership.LEAVE):
return return
try: try:
if event.membership == Membership.JOIN: if event.membership == Membership.JOIN:
room_end_token = now_token.room_key room_end_token = now_token.room_key
deferred_room_state = self.state_handler.get_current_state( deferred_room_state = self.state_handler.get_current_state(
event.room_id event.room_id
) )
else: elif event.membership == Membership.LEAVE:
room_end_token = "s%d" % (event.stream_ordering,) room_end_token = "s%d" % (event.stream_ordering,)
deferred_room_state = self.store.get_state_for_events( deferred_room_state = self.store.get_state_for_events(
event.room_id, [event.event_id], None event.room_id, [event.event_id], None