Handle setting retention period to 0

This commit is contained in:
Erik Johnston 2019-09-09 13:23:41 +01:00
parent 591d82f06b
commit 80e14a8546
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ class ServerConfig(Config):
# 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:
if redaction_retention_period is not None:
self.redaction_retention_period = self.parse_duration(
redaction_retention_period
)

View File

@ -1566,7 +1566,7 @@ class EventsStore(
Deferred
"""
if not self.hs.config.redaction_retention_period:
if self.hs.config.redaction_retention_period is None:
return
max_pos = yield self.find_first_stream_ordering_after_ts(