-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Move MSC3030 /timestamp_to_event endpoint to stable v1 location
#14471
Changes from 4 commits
0312ad3
80a2b96
ee00b8d
d73088f
ed1180a
e702a5d
394d917
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Move MSC3030 `/timestamp_to_event` endpoints to stable `v1` location (`/_matrix/client/v1/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>`, `/_matrix/federation/v1/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>`). |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -1284,17 +1284,14 @@ class TimestampLookupRestServlet(RestServlet): | |||
| `dir` can be `f` or `b` to indicate forwards and backwards in time from the | ||||
| given timestamp. | ||||
|
|
||||
| GET /_matrix/client/unstable/org.matrix.msc3030/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction> | ||||
| GET /_matrix/client/v1/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction> | ||||
| { | ||||
| "event_id": ... | ||||
| } | ||||
| """ | ||||
|
|
||||
| PATTERNS = ( | ||||
| re.compile( | ||||
| "^/_matrix/client/unstable/org.matrix.msc3030" | ||||
| "/rooms/(?P<room_id>[^/]*)/timestamp_to_event$" | ||||
| ), | ||||
| re.compile("^/_matrix/client/v1/rooms/(?P<room_id>[^/]*)/timestamp_to_event$"), | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just matched what synapse/synapse/rest/client/relations.py Line 85 in a84744f
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we're trying to not use Is anything using the unstable version that we need to care about or can we just swap right away? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I only know of the Element Web jump to date UI and the Matrix Public Archive.
But those things are experimental along with this endpoint and have no guarantees. For jump to date as it is in Element, it just won't show up since the server will show no support for
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If those are checking for the version flag than it sounds like it should be fine! 🎉 |
||||
| ) | ||||
|
|
||||
| def __init__(self, hs: "HomeServer"): | ||||
|
|
@@ -1421,8 +1418,7 @@ def register_servlets( | |||
| RoomAliasListServlet(hs).register(http_server) | ||||
| SearchRestServlet(hs).register(http_server) | ||||
| RoomCreateRestServlet(hs).register(http_server) | ||||
| if hs.config.experimental.msc3030_enabled: | ||||
| TimestampLookupRestServlet(hs).register(http_server) | ||||
| TimestampLookupRestServlet(hs).register(http_server) | ||||
|
|
||||
| # Some servlets only get registered for the main process. | ||||
| if not is_worker: | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.