diff options
author | Luke Barnard <lukeb@openmarket.com> | 2017-04-12 14:36:20 +0100 |
---|---|---|
committer | Luke Barnard <lukeb@openmarket.com> | 2017-04-12 14:36:20 +0100 |
commit | b9557064bf6003a666b8fb6813dd3618fe9e48b4 (patch) | |
tree | ce2cee50fe81f42be61fcc6591f7b337c13580bb /synapse/handlers/read_marker.py | |
parent | More null-guard changes (diff) | |
download | synapse-b9557064bf6003a666b8fb6813dd3618fe9e48b4.tar.xz |
Simplify is_event_after logic
Diffstat (limited to 'synapse/handlers/read_marker.py')
-rw-r--r-- | synapse/handlers/read_marker.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/read_marker.py b/synapse/handlers/read_marker.py index 800240b8a9..3f46a16b90 100644 --- a/synapse/handlers/read_marker.py +++ b/synapse/handlers/read_marker.py @@ -48,9 +48,10 @@ class ReadMarkerHandler(BaseHandler): should_update = True if existing_read_marker: + # Only update if the new marker is ahead in the stream should_update = yield self.store.is_event_after( - existing_read_marker['marker'], - event_id + event_id, + existing_read_marker['marker'] ) if should_update: |