0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-11 12:31:58 +01:00

Prevent breaking old sqlite's when media retention is enabled (#12977)

This commit is contained in:
Andrew Morgan 2022-06-07 12:28:08 +01:00 committed by GitHub
parent a47636c570
commit c51f5b9592
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

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

View file

@ -327,7 +327,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore):
if include_protected_media is False: if include_protected_media is False:
# Do not include media that has been protected from quarantine # Do not include media that has been protected from quarantine
sql += """ sql += """
AND safe_from_quarantine = false AND NOT safe_from_quarantine
""" """
def _get_local_media_ids_txn(txn: LoggingTransaction) -> List[str]: def _get_local_media_ids_txn(txn: LoggingTransaction) -> List[str]: