summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorLuke Barnard <lukeb@openmarket.com>2017-04-12 09:47:29 +0100
committerLuke Barnard <lukeb@openmarket.com>2017-04-12 09:47:29 +0100
commit77fb2b72aeccfa94a47b9088c885ed103edbfc60 (patch)
tree2d792b4f6e883c3143e11f78ad8a2d8e25a73fec /synapse
parenttravis flake8.. (diff)
downloadsynapse-77fb2b72aeccfa94a47b9088c885ed103edbfc60.tar.xz
Handle no previous RM
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/read_marker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/read_marker.py b/synapse/handlers/read_marker.py
index ee8cfc1c7a..43489b88bf 100644
--- a/synapse/handlers/read_marker.py
+++ b/synapse/handlers/read_marker.py
@@ -43,7 +43,10 @@ class ReadMarkerHandler(BaseHandler):
         # Get ordering for existing read marker
         with (yield self.read_marker_linearizer.queue((room_id, user_id))):
             account_data = yield self.store.get_account_data_for_room(user_id, room_id)
-            existing_read_marker = account_data["m.read_marker"]
+
+            existing_read_marker = None
+            if "m.read_marker" in account_data:
+                existing_read_marker = account_data["m.read_marker"]
 
             should_update = True