mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-05 15:35:04 -04:00
Allow retrieving the relations of a redacted event. (#12130)
This is allowed per MSC2675, although the original implementation did not allow for it and would return an empty chunk / not bundle aggregations. The main thing to improve is that the various caches get cleared properly when an event is redacted, and that edits must not leak if the original event is redacted (as that would presumably leak something similar to the original event content).
This commit is contained in:
parent
3e4af36bc8
commit
88cd6f9378
8 changed files with 119 additions and 80 deletions
|
@ -191,6 +191,10 @@ class CacheInvalidationWorkerStore(SQLBaseStore):
|
|||
|
||||
if redacts:
|
||||
self._invalidate_get_event_cache(redacts)
|
||||
# Caches which might leak edits must be invalidated for the event being
|
||||
# redacted.
|
||||
self.get_relations_for_event.invalidate((redacts,))
|
||||
self.get_applicable_edit.invalidate((redacts,))
|
||||
|
||||
if etype == EventTypes.Member:
|
||||
self._membership_stream_cache.entity_has_changed(state_key, stream_ordering)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue