-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Prevent redacted events from appearing in message search #6377
Conversation
985ba7f
to
916e71b
Compare
include the previous states content in the unsigned field. | ||
allow_rejected (bool): If True return rejected events. | ||
allow_rejected: If True, return rejected events. | ||
allow_redacted: If True, return redacted events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you document the interaction between check_redacted
and allow_redacted
more clearly? What is the meaning of check_redacted
if allow_redacted
is False?
(maybe we should replace check_redacted
with a tristate?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I've switched it out for an enum now, let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, though there's something wrong with the CI
…rch_redacted_events * 'develop' of github.com:matrix-org/synapse: (100 commits) Move get_state methods into FederationHandler (#6503) Allow SAML username provider plugins (#6411) Fix race which caused deleted devices to reappear (#6514) Refactor get_events_from_store_or_dest to return a dict (#6501) Remove redundant code from event authorisation implementation. (#6502) Newsfile Silence mypy errors for files outside those specified Newsfile Phone home stats DB reporting should not assume a single DB. Update comment Drop unused index Convert _censor_redactions to async since it awaits on coroutines Only start censor background job after indices are created Newsfile Newsfile Fix make_deferred_yieldable to work with coroutines Newsfile Fix support for SQLite 3.7. Better errors regarding changing avatar_url (#6497) 1.7.0rc1 ...
Unfortunately it looks like this doesn't entirely fix the problem. Redacted events are still returned. The test wasn't correctly testing that a redacted event didn't appear in the results. |
* commit 'fc316a489': Prevent redacted events from appearing in message search (#6377)
Fixes #1454
Removes an event from theevent_search
table upon redaction.Associated sytest: matrix-org/sytest#747
Note: This PR is not a complete solution. #6522 should also be considered.