diff options
author | Jeong Arm <kjwonmail@gmail.com> | 2019-05-10 05:03:21 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-05-09 22:03:20 +0200 |
commit | 03801fcaa5f93e0c9da1a70caf596f66a632f335 (patch) | |
tree | 70f2cd62b132640885eeb64742b36b3cca321464 | |
parent | ce8635605c3be41ef0a20ade0e7a89b170bf7f04 (diff) |
Remove custom emojis on "tootctl domains purge" (#10721)
* Remove custom emojis on domains purge * Change message "Removing" to "Removed"
-rw-r--r-- | lib/mastodon/domains_cli.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb index 303b8a94a..b081581fe 100644 --- a/lib/mastodon/domains_cli.rb +++ b/lib/mastodon/domains_cli.rb @@ -28,10 +28,15 @@ module Mastodon say('.', :green, false) end - DomainBlock.where(domain: domain).destroy_all + DomainBlock.where(domain: domain).destroy_all unless options[:dry_run] say say("Removed #{removed} accounts#{dry_run}", :green) + + custom_emojis = CustomEmoji.where(domain: domain) + custom_emojis_count = custom_emojis.count + custom_emojis.destroy_all unless options[:dry_run] + say("Removed #{custom_emojis_count} custom emojis", :green) end option :concurrency, type: :numeric, default: 50, aliases: [:c] |