summary refs log tree commit diff
path: root/synapse/rest/client
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/rest/client
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/rest/client')
-rw-r--r--synapse/rest/client/v2_alpha/account_data.py6
-rw-r--r--synapse/rest/client/v2_alpha/read_marker.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/synapse/rest/client/v2_alpha/account_data.py b/synapse/rest/client/v2_alpha/account_data.py
index 1f9f42e661..0e0a187efd 100644
--- a/synapse/rest/client/v2_alpha/account_data.py
+++ b/synapse/rest/client/v2_alpha/account_data.py
@@ -82,11 +82,11 @@ class RoomAccountDataServlet(RestServlet):
 
         body = parse_json_object_from_request(request)
 
-        if account_data_type == "m.read_marker":
+        if account_data_type == "m.fully_read":
             raise SynapseError(
                 405,
-                "Cannot set m.read_marker through this API."
-                " Use /rooms/!roomId:server.name/read_marker"
+                "Cannot set m.fully_read through this API."
+                " Use /rooms/!roomId:server.name/read_markers"
             )
 
         max_id = yield self.store.add_account_data_to_room(
diff --git a/synapse/rest/client/v2_alpha/read_marker.py b/synapse/rest/client/v2_alpha/read_marker.py
index 95e8e39974..2f8784fe06 100644
--- a/synapse/rest/client/v2_alpha/read_marker.py
+++ b/synapse/rest/client/v2_alpha/read_marker.py
@@ -25,7 +25,7 @@ logger = logging.getLogger(__name__)
 
 
 class ReadMarkerRestServlet(RestServlet):
-    PATTERNS = client_v2_patterns("/rooms/(?P<room_id>[^/]*)/read_marker$")
+    PATTERNS = client_v2_patterns("/rooms/(?P<room_id>[^/]*)/read_markers$")
 
     def __init__(self, hs):
         super(ReadMarkerRestServlet, self).__init__()
@@ -51,7 +51,7 @@ class ReadMarkerRestServlet(RestServlet):
                 event_id=read_event_id
             )
 
-        read_marker_event_id = body.get("m.read_marker", None)
+        read_marker_event_id = body.get("m.fully_read", None)
         if read_marker_event_id:
             yield self.read_marker_handler.received_client_read_marker(
                 room_id,