diff options
author | Gomasy <nyan@gomasy.jp> | 2020-01-11 14:41:37 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2020-01-11 06:41:37 +0100 |
commit | 3b08535463029f45e3524ce2ccaea746eda15c57 (patch) | |
tree | a2e8ae3e70ae4ef363f99cda20047ac5f55eaa6e | |
parent | 5b9f01aec088ede54d82d8997be69af394c4eda3 (diff) |
Keep statuses bookmarked by local users in tootctl statuses remove (#12818)
-rw-r--r-- | lib/mastodon/statuses_cli.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mastodon/statuses_cli.rb b/lib/mastodon/statuses_cli.rb index 74f15de5f..ecaac17e3 100644 --- a/lib/mastodon/statuses_cli.rb +++ b/lib/mastodon/statuses_cli.rb @@ -48,6 +48,8 @@ module Mastodon scope = scope.where('id NOT IN (SELECT statuses1.reblog_of_id FROM statuses AS statuses1 WHERE statuses.id = statuses1.reblog_of_id AND (statuses1.uri IS NULL OR statuses1.local OR statuses1.id >= ?))', max_id) # Skip statuses favourited by local users scope = scope.where('id NOT IN (SELECT favourites.status_id FROM favourites WHERE statuses.id = favourites.status_id AND favourites.account_id IN (SELECT accounts.id FROM accounts WHERE domain IS NULL))') + # Skip statuses bookmarked by local users + scope = scope.where('id NOT IN (SELECT bookmarks.status_id FROM bookmarks WHERE statuses.id = bookmarks.status_id AND bookmarks.account_id IN (SELECT accounts.id FROM accounts WHERE domain IS NULL))') unless options[:clean_followed] # Skip accounts followed by local accounts |