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

Commit c51f5b9

Browse files
Prevent breaking old sqlite's when media retention is enabled (#12977)
1 parent a47636c commit c51f5b9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/12977.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add new `media_retention` options to the homeserver config for routinely cleaning up non-recently accessed media.

synapse/storage/databases/main/media_repository.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ async def get_local_media_ids(
327327
if include_protected_media is False:
328328
# Do not include media that has been protected from quarantine
329329
sql += """
330-
AND safe_from_quarantine = false
330+
AND NOT safe_from_quarantine
331331
"""
332332

333333
def _get_local_media_ids_txn(txn: LoggingTransaction) -> List[str]:

0 commit comments

Comments
 (0)