This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Prevent local quarantined media from being claimed by media retention #12972
Merged
anoadragon453
merged 11 commits into
develop
from
anoa/media_retention_quarantine_support
Jun 7, 2022
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b51107a
Prevent local quarantined media from being claimed by media retention
anoadragon453 d0d3a69
Protect remote quarantined media from media retention
anoadragon453 62b17cd
Test that media retention does not remove quarantined media
anoadragon453 2d837fc
Rename *_before methods, as they do more these days
anoadragon453 e60beb9
Remove 'local' from log line about potentially remote media
anoadragon453 e4837e6
Changelog
anoadragon453 97f0c5d
Additionally prevent protected media from being purged
anoadragon453 bfba18b
Update media retention tests to include protected media
anoadragon453 548b333
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/med…
anoadragon453 66c33bf
Add missing arg to docstring
anoadragon453 45a8d38
Use false, not 0, in SQL to check booleans
anoadragon453 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, there's a bit of a discrepancy here in that
delete_old_local_media
gives you a choice of whether you want to delete quarantined media or not, whereasdelete_old_remote_media
decides for you (always false).This arose from the fact that
delete_old_local_media
had an admin API attached to it which may want to sprout a new query parameter for whether quarantined media is deleted, whereas the remote media side had no such API.It'd probably still be nice to align the two though.