Fix 500 error with Postgres when looking backwards with the MSC3030 `/timestamp_to_event` endpoint (#12024)
parent
40e256e7aa
commit
5a6911598a
|
@ -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.
|
|
@ -1854,7 +1854,7 @@ class EventsWorkerStore(SQLBaseStore):
|
||||||
forward_edge_query = """
|
forward_edge_query = """
|
||||||
SELECT 1 FROM event_edges
|
SELECT 1 FROM event_edges
|
||||||
/* Check to make sure the event referencing our event in question is not rejected */
|
/* 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
|
WHERE
|
||||||
event_edges.room_id = ?
|
event_edges.room_id = ?
|
||||||
AND event_edges.prev_event_id = ?
|
AND event_edges.prev_event_id = ?
|
||||||
|
|
Loading…
Reference in New Issue