diff options
author | Eric Eastwood <erice@element.io> | 2022-02-18 06:11:18 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 12:11:18 +0000 |
commit | 5a6911598ad2d3dea96b9f8c1cffccd4f4840bf7 (patch) | |
tree | f160fe502b65185103c32b2471692ef60369d5c4 | |
parent | Update the olddeps CI check to use an old version of markupsafe (#12025) (diff) | |
download | synapse-5a6911598ad2d3dea96b9f8c1cffccd4f4840bf7.tar.xz |
Fix 500 error with Postgres when looking backwards with the MSC3030 `/timestamp_to_event` endpoint (#12024)
-rw-r--r-- | changelog.d/12024.bugfix | 1 | ||||
-rw-r--r-- | synapse/storage/databases/main/events_worker.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/12024.bugfix b/changelog.d/12024.bugfix new file mode 100644 index 0000000000..59bcdb93a5 --- /dev/null +++ b/changelog.d/12024.bugfix @@ -0,0 +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. diff --git a/synapse/storage/databases/main/events_worker.py b/synapse/storage/databases/main/events_worker.py index 712b8ce204..2a255d1031 100644 --- a/synapse/storage/databases/main/events_worker.py +++ b/synapse/storage/databases/main/events_worker.py @@ -1854,7 +1854,7 @@ class EventsWorkerStore(SQLBaseStore): forward_edge_query = """ SELECT 1 FROM event_edges /* Check to make sure the event referencing our event in question is not rejected */ - LEFT JOIN rejections ON event_edges.event_id == rejections.event_id + LEFT JOIN rejections ON event_edges.event_id = rejections.event_id WHERE event_edges.room_id = ? AND event_edges.prev_event_id = ? |