diff options
author | Patrick Cloke <patrickc@matrix.org> | 2023-05-17 14:25:20 -0400 |
---|---|---|
committer | Patrick Cloke <patrickc@matrix.org> | 2023-05-17 14:26:01 -0400 |
commit | 9796706a9645292d5e0147aac6a643018157d57f (patch) | |
tree | 5d21bd6f660e2ba5cf34ef42b2845d89e8978897 | |
parent | Properly invalidate caches over replication. (diff) | |
download | synapse-github/clokep/datastore-rejigger.tar.xz |
Fix references to get_events. github/clokep/datastore-rejigger clokep/datastore-rejigger
-rw-r--r-- | synapse/storage/databases/main/relations.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/relations.py b/synapse/storage/databases/main/relations.py index 4a6c6c724d..9ae7d08985 100644 --- a/synapse/storage/databases/main/relations.py +++ b/synapse/storage/databases/main/relations.py @@ -557,14 +557,14 @@ class RelationsWorkerStore(SQLBaseStore): "get_applicable_edits", _get_applicable_edits_txn ) - edits = await self.get_events(edit_ids.values()) # type: ignore[attr-defined] + edits = await self.hs.get_datastores().main.get_events(edit_ids.values()) # Map to the original event IDs to the edit events. # # There might not be an edit event due to there being no edits or # due to the event not being known, either case is treated the same. return { - original_event_id: edits.get(edit_ids.get(original_event_id)) + original_event_id: edits.get(edit_ids.get(original_event_id)) # type: ignore[arg-type] for original_event_id in event_ids } @@ -671,7 +671,9 @@ class RelationsWorkerStore(SQLBaseStore): "get_thread_summaries", _get_thread_summaries_txn ) - latest_events = await self.get_events(latest_event_ids.values()) # type: ignore[attr-defined] + latest_events = await self.hs.get_datastores().main.get_events( + latest_event_ids.values() + ) # Map to the event IDs to the thread summary. # |