0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-15 11:03:45 +01:00
dendrite/syncapi/storage/postgres
Ashley Nelson c1e16fd41e
Fix fragility of selectEventsWithEventIDsSQL queries (#2757)
This fixes a temporary workaround with the `selectEventsWithEventIDsSQL`
queries where fields need to be artificially added to the queries so the
row results match the format of the `syncapi_output_room_events` table.
I made similar functions that accept row results from the
`syncapi_current_room_state` table and convert them into StreamEvents
without the fields that are specific to output room events.

There is also a unit test in the first commit to ensure the resulting
behavior doesn't change from the modified queries and functions.

Fixes #601.

### Pull Request Checklist

<!-- Please read docs/CONTRIBUTING.md before submitting your pull
request -->

* [x] I have added tests for PR _or_ I have justified why this PR
doesn't need tests.
* [x] Pull request includes a [sign
off](https://github.com/matrix-org/dendrite/blob/main/docs/CONTRIBUTING.md#sign-off)

Signed-off-by: `Ashley Nelson <fant@shley.email>`

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-10-03 11:57:21 +01:00
..
deltas Implement history visibility on /messages, /context, /sync (#2511) 2022-08-11 18:23:35 +02:00
account_data_table.go Consistent *sql.Tx usage across sync API (#2744) 2022-09-28 10:18:03 +01:00
backwards_extremities_table.go Consistent *sql.Tx usage across sync API (#2744) 2022-09-28 10:18:03 +01:00
current_room_state_table.go Fix fragility of selectEventsWithEventIDsSQL queries (#2757) 2022-10-03 11:57:21 +01:00
filter_table.go Consistent *sql.Tx usage across sync API (#2744) 2022-09-28 10:18:03 +01:00
filtering.go Correctly use provided filters (#2339) 2022-04-11 09:05:23 +02:00
ignores_table.go More writer fixes in the Sync API 2022-09-09 13:06:42 +01:00
invites_table.go Transactional isolation for /sync (#2745) 2022-09-30 12:48:10 +01:00
memberships_table.go Implement history visibility on /messages, /context, /sync (#2511) 2022-08-11 18:23:35 +02:00
notification_data_table.go Refactor notifications (#2688) 2022-09-27 15:01:34 +02:00
output_room_events_table.go Consistent *sql.Tx usage across sync API (#2744) 2022-09-28 10:18:03 +01:00
output_room_events_topology_table.go Consistent *sql.Tx usage across sync API (#2744) 2022-09-28 10:18:03 +01:00
peeks_table.go Consistent *sql.Tx usage across sync API (#2744) 2022-09-28 10:18:03 +01:00
presence_table.go Limit presence in /sync responses (#2394) 2022-04-28 15:12:40 +01:00
receipt_table.go Consistent *sql.Tx usage across sync API (#2744) 2022-09-28 10:18:03 +01:00
send_to_device_table.go Index on syncapi_send_to_device table (#2684) 2022-08-30 14:47:54 +01:00
syncserver.go Implement history visibility on /messages, /context, /sync (#2511) 2022-08-11 18:23:35 +02:00