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

Commit 5a69115

Browse files
Fix 500 error with Postgres when looking backwards with the MSC3030 /timestamp_to_event endpoint (#12024)
1 parent 40e256e commit 5a69115

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/12024.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix 500 error with Postgres when looking backwards with the [MSC3030](https://github.com/matrix-org/matrix-doc/pull/3030) `/timestamp_to_event?dir=b` endpoint.

synapse/storage/databases/main/events_worker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,7 @@ def is_event_next_to_gap_txn(txn: LoggingTransaction) -> bool:
18541854
forward_edge_query = """
18551855
SELECT 1 FROM event_edges
18561856
/* Check to make sure the event referencing our event in question is not rejected */
1857-
LEFT JOIN rejections ON event_edges.event_id == rejections.event_id
1857+
LEFT JOIN rejections ON event_edges.event_id = rejections.event_id
18581858
WHERE
18591859
event_edges.room_id = ?
18601860
AND event_edges.prev_event_id = ?

0 commit comments

Comments
 (0)