mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 04:24:56 -04:00
Prevent redacted events from appearing in message search (#6377)
This commit is contained in:
parent
6676ee9c4a
commit
fc316a4894
6 changed files with 78 additions and 43 deletions
|
@ -63,6 +63,7 @@ from synapse.replication.http.federation import (
|
|||
)
|
||||
from synapse.replication.http.membership import ReplicationUserJoinedLeftRoomRestServlet
|
||||
from synapse.state import StateResolutionStore, resolve_events_with_store
|
||||
from synapse.storage.data_stores.main.events_worker import EventRedactBehaviour
|
||||
from synapse.types import UserID, get_domain_from_id
|
||||
from synapse.util import batch_iter, unwrapFirstError
|
||||
from synapse.util.async_helpers import Linearizer
|
||||
|
@ -423,7 +424,7 @@ class FederationHandler(BaseHandler):
|
|||
evs = yield self.store.get_events(
|
||||
list(state_map.values()),
|
||||
get_prev_content=False,
|
||||
check_redacted=False,
|
||||
redact_behaviour=EventRedactBehaviour.AS_IS,
|
||||
)
|
||||
event_map.update(evs)
|
||||
|
||||
|
@ -1000,7 +1001,9 @@ class FederationHandler(BaseHandler):
|
|||
forward_events = yield self.store.get_successor_events(list(extremities))
|
||||
|
||||
extremities_events = yield self.store.get_events(
|
||||
forward_events, check_redacted=False, get_prev_content=False
|
||||
forward_events,
|
||||
redact_behaviour=EventRedactBehaviour.AS_IS,
|
||||
get_prev_content=False,
|
||||
)
|
||||
|
||||
# We set `check_history_visibility_only` as we might otherwise get false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue