summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-09-05 17:16:03 +0100
committerErik Johnston <erik@matrix.org>2019-09-05 17:16:45 +0100
commit3ff0422d2dbfa668df365da99a4b7caeea85528d (patch)
treebc0bd307ad4c40f86d839a12c97d483d99c47a19 /synapse/config
parentNewsfile (diff)
downloadsynapse-3ff0422d2dbfa668df365da99a4b7caeea85528d.tar.xz
Make redaction retention period configurable
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/server.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 2abdef0971..8efab924d4 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -162,6 +162,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")
+        if redaction_retention_period:
+            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", "")
@@ -718,6 +728,11 @@ class ServerConfig(Config):
         # Defaults to 'true'.
         #
         #allow_per_room_profiles: false
+
+        # How long to keep redacted events in unredacted form in the database.
+        # By default redactions are kept indefinitely.
+        #
+        #redaction_retention_period: 30d
         """
             % locals()
         )