summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorLuke Barnard <lukebarnard1@users.noreply.github.com>2017-04-18 17:46:15 +0100
committerRichard van der Hoff <github@rvanderhoff.org.uk>2017-04-18 17:46:15 +0100
commit3fb8784c9243da32d680b21773f35d885e8be480 (patch)
tree4fde80c2e42cf92f07268f14baa613478a1e6c82 /synapse/handlers
parentMerge pull request #2132 from feld/patch-1 (diff)
downloadsynapse-3fb8784c9243da32d680b21773f35d885e8be480.tar.xz
m.read_marker -> m.fully_read (#2128)
Also:
 - change the REST endpoint to have a "S" on the end (so it's now /read_markers)
 - change the content of the m.read_up_to event to have the key "event_id" instead of "marker".
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/read_marker.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/read_marker.py b/synapse/handlers/read_marker.py
index 3f46a16b90..b5b0303d54 100644
--- a/synapse/handlers/read_marker.py
+++ b/synapse/handlers/read_marker.py
@@ -43,7 +43,7 @@ class ReadMarkerHandler(BaseHandler):
         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.get("m.read_marker", None)
+            existing_read_marker = account_data.get("m.fully_read", None)
 
             should_update = True
 
@@ -51,14 +51,14 @@ class ReadMarkerHandler(BaseHandler):
                 # Only update if the new marker is ahead in the stream
                 should_update = yield self.store.is_event_after(
                     event_id,
-                    existing_read_marker['marker']
+                    existing_read_marker['event_id']
                 )
 
             if should_update:
                 content = {
-                    "marker": event_id
+                    "event_id": event_id
                 }
                 max_id = yield self.store.add_account_data_to_room(
-                    user_id, room_id, "m.read_marker", content
+                    user_id, room_id, "m.fully_read", content
                 )
                 self.notifier.on_new_event("account_data_key", max_id, users=[user_id])