summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/room.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py

index eba4acd758..db3d052d33 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py
@@ -238,6 +238,14 @@ class RoomWorkerStore(SQLBaseStore): Returns: dict[int, int]: "min_lifetime" and "max_lifetime" for this room. """ + # If the room retention feature is disabled, return a policy with no minimum nor + # maximum, in order not to filter out events we should filter out when sending to + # the client. + if not self.config.retention_enabled: + defer.returnValue({ + "min_lifetime": None, + "max_lifetime": None, + }) def get_retention_policy_for_room_txn(txn): txn.execute(