hometown-fork / hometown

A supported fork of Mastodon that provides local posting and a wider range of content types.
GNU Affero General Public License v3.0
736 stars 56 forks source link

Add command to remove avatar and header images of inactive remote acc… #1259

Closed dariusk closed 1 year ago

dariusk commented 1 year ago

This cherry-picks this pull request commit into Hometown. It will be coming in a future Mastodon release but we will get it early. Basically it adds options to tootctl media remove:

Removes locally cached copies of media attachments (and optionally profile headers and avatars) from other servers. By default, only media attachements are removed. The --days option specifies how old media attachments have to be before they are removed. In case of avatars and headers, it specifies how old the last webfinger request and update to the user has to be before they are pruned. It defaults to 7 days. If --prune-profiles is specified, only avatars and headers are removed. If --remove-headers is specified, only headers are removed. If --include-follows is specified along with --prune-profiles or --remove-headers, all non-local profiles will be pruned irrespective of follow status. By default, only accounts that are not followed by or following anyone locally are pruned.

Relates to but does not fully address #1209 because there needs to be a web UI component, too.

futzle commented 1 year ago

Feedback after running this a couple of days ago: It works, but I noticed that avatars of seldom-active users whose avatars got pruned but who then later mention or boost or favourite a post of mine continue to have the missing avatar icon. It remains like that until I manually re-fetch the avatar by searching for the user's URL in the web interface.

mastodon/mastodon#22149 mentions that this will happen, and that recaching will happen under "certain circumstances". It feels like this list of circumstances is missing some cases where I expected recaching to happen automatically.