summary refs log tree commit diff
path: root/synapse/federation/federation_base.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2021-06-29 11:27:25 +0100
committerRichard van der Hoff <richard@matrix.org>2021-06-29 11:27:25 +0100
commit077d441d42a34c994a3eeeaa2068b837a96e5a7c (patch)
treef6e387b9288d7f932c618aa2983cc75b6f28facd /synapse/federation/federation_base.py
parentFix SQL (diff)
parentMigrate stream_ordering to a bigint (#10264) (diff)
downloadsynapse-077d441d42a34c994a3eeeaa2068b837a96e5a7c.tar.xz
Merge branch 'develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/federation/federation_base.py')
-rw-r--r--synapse/federation/federation_base.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/federation/federation_base.py b/synapse/federation/federation_base.py

index c066617b92..2bfe6a3d37 100644 --- a/synapse/federation/federation_base.py +++ b/synapse/federation/federation_base.py
@@ -89,12 +89,12 @@ class FederationBase: result = await self.spam_checker.check_event_for_spam(pdu) if result: - logger.warning( - "Event contains spam, redacting %s: %s", - pdu.event_id, - pdu.get_pdu_json(), - ) - return prune_event(pdu) + logger.warning("Event contains spam, soft-failing %s", pdu.event_id) + # we redact (to save disk space) as well as soft-failing (to stop + # using the event in prev_events). + redacted_event = prune_event(pdu) + redacted_event.internal_metadata.soft_failed = True + return redacted_event return pdu