diff --git a/synapse/storage/databases/main/events_worker.py b/synapse/storage/databases/main/events_worker.py index 96c9ab215881..98950af908eb 100644 --- a/synapse/storage/databases/main/events_worker.py +++ b/synapse/storage/databases/main/events_worker.py @@ -1471,6 +1471,8 @@ async def _fetch_event_ids_and_get_outstanding_redactions( await self._get_event_cache.set((event_id,), cache_entry) result_map[event_id] = cache_entry + self.add_to_event_metadata(event_id, cache_entry) + if not redacted_event: # We only cache references to unredacted events. self._event_ref[event_id] = original_ev