Update hashtag prune to account for followed hashtags #844

Open
norm wants to merge 2 commits from norm/akkoma:hashtag-prune into develop

2 commits

Author SHA1 Message Date
88a8086ad3 Use LEFT JOIN instead of UNION for hashtag pruning
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/build-arm64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending
2024-10-25 12:26:14 -04:00
40da4e88ea Update hashtag prune to account for followed hashtags
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending
ci/woodpecker/pr/build-arm64 Pipeline is pending
ci/woodpecker/pr/docs Pipeline is pending
ci/woodpecker/pr/lint Pipeline is pending
ci/woodpecker/pr/test Pipeline is pending
Currently pruning hashtags with the prune_objects task only accounts
for whether that hashtag is associated with an object, but this may
lead to a foreign key constraint violation if that hashtag has no
objects but is followed by a local user.

This adds an additional check to see if that hashtag has any followers
before proceeding to delete it.
2024-10-25 11:55:37 -04:00