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

Commit

Permalink
Default to censoring redactions after seven days
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Sep 9, 2019
1 parent e7184a4 commit 8b9ade8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,12 @@ listeners:
#
#allow_per_room_profiles: false

# How long to keep redacted events in unredacted form in the database.
# By default redactions are kept indefinitely.
# 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.
#
#redaction_retention_period: 30d
# Defaults to `7d`. Set to `null` to disable.
#
redaction_retention_period: 7d


## TLS ##
Expand Down
10 changes: 6 additions & 4 deletions synapse/config/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def read_config(self, config, **kwargs):

# How long to keep redacted events in the database in unredacted form
# before redacting them.
redaction_retention_period = config.get("redaction_retention_period")
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
Expand Down Expand Up @@ -729,10 +729,12 @@ def generate_config_section(
#
#allow_per_room_profiles: false
# How long to keep redacted events in unredacted form in the database.
# By default redactions are kept indefinitely.
# 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.
#
#redaction_retention_period: 30d
# Defaults to `7d`. Set to `null` to disable.
#
redaction_retention_period: 7d
"""
% locals()
)
Expand Down

0 comments on commit 8b9ade8

Please sign in to comment.