Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 8b9ade8

Browse files
committed
Default to censoring redactions after seven days
1 parent e7184a4 commit 8b9ade8

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

docs/sample_config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,12 @@ listeners:
306306
#
307307
#allow_per_room_profiles: false
308308

309-
# How long to keep redacted events in unredacted form in the database.
310-
# By default redactions are kept indefinitely.
309+
# How long to keep redacted events in unredacted form in the database. After
310+
# this period redacted events get replaced with their redacted form in the DB.
311311
#
312-
#redaction_retention_period: 30d
312+
# Defaults to `7d`. Set to `null` to disable.
313+
#
314+
redaction_retention_period: 7d
313315

314316

315317
## TLS ##

synapse/config/server.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def read_config(self, config, **kwargs):
164164

165165
# How long to keep redacted events in the database in unredacted form
166166
# before redacting them.
167-
redaction_retention_period = config.get("redaction_retention_period")
167+
redaction_retention_period = config.get("redaction_retention_period", "7d")
168168
if redaction_retention_period is not None:
169169
self.redaction_retention_period = self.parse_duration(
170170
redaction_retention_period
@@ -729,10 +729,12 @@ def generate_config_section(
729729
#
730730
#allow_per_room_profiles: false
731731
732-
# How long to keep redacted events in unredacted form in the database.
733-
# By default redactions are kept indefinitely.
732+
# How long to keep redacted events in unredacted form in the database. After
733+
# this period redacted events get replaced with their redacted form in the DB.
734734
#
735-
#redaction_retention_period: 30d
735+
# Defaults to `7d`. Set to `null` to disable.
736+
#
737+
redaction_retention_period: 7d
736738
"""
737739
% locals()
738740
)

0 commit comments

Comments
 (0)