summary refs log tree commit diff
path: root/synapse/config/server.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-25 11:41:35 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-25 11:41:35 +0000
commit6bedb3fe1c5698cb9c2d7423a02f9875941d7191 (patch)
treef6cd9736fe3d68e2700f4b5a8359d62c1e482d38 /synapse/config/server.py
parentAdd a build info metric to Prometheus (#6005) (diff)
parentMerge pull request #5934 from matrix-org/erikj/censor_redactions (diff)
downloadsynapse-6bedb3fe1c5698cb9c2d7423a02f9875941d7191.tar.xz
Merge pull request #5934 from matrix-org/erikj/censor_redactions
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r--synapse/config/server.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 6c1e505777..6fe9d8c6a8 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -168,6 +168,16 @@ class ServerConfig(Config):
 
         self.mau_trial_days = config.get("mau_trial_days", 0)
 
+        # How long to keep redacted events in the database in unredacted form
+        # before redacting them.
+        redaction_retention_period = config.get("redaction_retention_period", "7d")
+        if redaction_retention_period is not None:
+            self.redaction_retention_period = self.parse_duration(
+                redaction_retention_period
+            )
+        else:
+            self.redaction_retention_period = None
+
         # Options to disable HS
         self.hs_disabled = config.get("hs_disabled", False)
         self.hs_disabled_message = config.get("hs_disabled_message", "")
@@ -923,6 +933,13 @@ class ServerConfig(Config):
           #  - shortest_max_lifetime: 3d
           #    longest_max_lifetime: 1y
           #    interval: 24h
+
+        # How long to keep redacted events in unredacted form in the database. After
+        # this period redacted events get replaced with their redacted form in the DB.
+        #
+        # Defaults to `7d`. Set to `null` to disable.
+        #
+        redaction_retention_period: 7d
         """
             % locals()
         )