diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-09-21 14:17:16 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-09-21 14:17:16 +0100 |
commit | 0c162859897cb0cae5e501109e3d51d0e861e194 (patch) | |
tree | 9e84a0109f9b5ff4f4b7d98b02ed057688043915 | |
parent | Clamp the "to" token for /rooms/{roomId}/messages to when the user left (diff) | |
download | synapse-0c162859897cb0cae5e501109e3d51d0e861e194.tar.xz |
Add explicit "elif event.membership == Membership.LEAVE" for clarity
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/message.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index bca592f5d7..5593a8d4f7 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -389,13 +389,14 @@ class MessageHandler(BaseHandler): if event.membership not in (Membership.JOIN, Membership.LEAVE): return + try: if event.membership == Membership.JOIN: room_end_token = now_token.room_key deferred_room_state = self.state_handler.get_current_state( event.room_id ) - else: + elif event.membership == Membership.LEAVE: room_end_token = "s%d" % (event.stream_ordering,) deferred_room_state = self.store.get_state_for_events( event.room_id, [event.event_id], None |