From c4074e4ab67e53705029657147e847ee08a429b5 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 3 Dec 2018 10:15:39 +0000 Subject: Revert "Merge branch 'rav/timestamp_patch' into matrix-org-hotfixes" This reverts commit 7960e814e5386b32821ef51915e609091e6e1569, reversing changes made to 3dd704ee9af836b9b3e50daf1017a3d65c9ebaec. We no longer need this; please redo it as a proper MSC & synapse PR if you want to keep it... --- synapse/rest/client/v1/room.py | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'synapse/rest/client/v1/room.py') diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index f296257b11..fcfe7857f6 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -825,29 +825,6 @@ class JoinedRoomsRestServlet(ClientV1RestServlet): defer.returnValue((200, {"joined_rooms": list(room_ids)})) -class TimestampLookupRestServlet(ClientV1RestServlet): - PATTERNS = client_path_patterns("/rooms/(?P[^/]*)/timestamp_to_event$") - - def __init__(self, hs): - super(TimestampLookupRestServlet, self).__init__(hs) - self.store = hs.get_datastore() - - @defer.inlineCallbacks - def on_GET(self, request, room_id): - requester = yield self.auth.get_user_by_req(request) - yield self.auth.check_joined_room(room_id, requester.user.to_string()) - - timestamp = parse_integer(request, "ts") - - event_id = yield self.store.get_event_for_timestamp( - room_id, timestamp, - ) - - defer.returnValue((200, { - "event_id": event_id, - })) - - def register_txn_path(servlet, regex_string, http_server, with_get=False): """Registers a transaction-based path. @@ -897,7 +874,6 @@ def register_servlets(hs, http_server): JoinedRoomsRestServlet(hs).register(http_server) RoomEventServlet(hs).register(http_server) RoomEventContextServlet(hs).register(http_server) - TimestampLookupRestServlet(hs).register(http_server) def register_deprecated_servlets(hs, http_server): -- cgit 1.5.1