diff options
author | Erik Johnston <erik@matrix.org> | 2019-09-05 17:16:03 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-09-05 17:16:45 +0100 |
commit | 3ff0422d2dbfa668df365da99a4b7caeea85528d (patch) | |
tree | bc0bd307ad4c40f86d839a12c97d483d99c47a19 /synapse/storage/events.py | |
parent | Newsfile (diff) | |
download | synapse-3ff0422d2dbfa668df365da99a4b7caeea85528d.tar.xz |
Make redaction retention period configurable
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 2970da6829..d0d1781c90 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -1566,10 +1566,12 @@ class EventsStore( Deferred """ - if self.stream_ordering_month_ago is None: + if not self.hs.config.redaction_retention_period: return - max_pos = self.stream_ordering_month_ago + max_pos = yield self.find_first_stream_ordering_after_ts( + self._clock.time_msec() - self.hs.config.redaction_retention_period + ) # We fetch all redactions that point to an event that we have that has # a stream ordering from over a month ago, that we haven't yet censored |