Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit ed1180a

Browse files
committed
Fix federation path
1 parent d73088f commit ed1180a

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

synapse/federation/federation_client.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,9 +1691,19 @@ async def _timestamp_to_event_from_destination(
16911691
# to return events on *both* sides of the timestamp to
16921692
# help reconcile the gap faster.
16931693
_timestamp_to_event_from_destination,
1694+
# Since this endpoint is new, we should try other servers before giving up.
1695+
# We can safely remove this in a year (remove after 2023-11-16).
1696+
failover_on_unknown_endpoint=True,
16941697
)
16951698
return timestamp_to_event_response
1696-
except SynapseError:
1699+
except SynapseError as e:
1700+
logger.warn(
1701+
"timestamp_to_event(room_id=%s, timestamp=%s, direction=%s): encountered error when trying to fetch from destinations: %s",
1702+
room_id,
1703+
timestamp,
1704+
direction,
1705+
e,
1706+
)
16971707
return None
16981708

16991709
async def _timestamp_to_event_from_destination(

synapse/federation/transport/client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,8 @@ async def timestamp_to_event(
185185
Raises:
186186
Various exceptions when the request fails
187187
"""
188-
path = _create_path(
189-
FEDERATION_UNSTABLE_PREFIX,
190-
"/org.matrix.msc3030/timestamp_to_event/%s",
188+
path = _create_v1_path(
189+
"/timestamp_to_event/%s",
191190
room_id,
192191
)
193192

0 commit comments

Comments
 (0)