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

Commit

Permalink
Prevent breaking old sqlite's when media retention is enabled (#12977)
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 authored Jun 7, 2022
1 parent a47636c commit c51f5b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/12977.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add new `media_retention` options to the homeserver config for routinely cleaning up non-recently accessed media.
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/media_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ async def get_local_media_ids(
if include_protected_media is False:
# Do not include media that has been protected from quarantine
sql += """
AND safe_from_quarantine = false
AND NOT safe_from_quarantine
"""

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

0 comments on commit c51f5b9

Please sign in to comment.