Skip to content

Commit

Permalink
Remove custom emojis on "tootctl domains purge" (mastodon#10721)
Browse files Browse the repository at this point in the history
* Remove custom emojis on domains purge

* Change message "Removing" to "Removed"
  • Loading branch information
tribela authored and Gargron committed May 9, 2019
1 parent 24be45f commit 6149a10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/mastodon/domains_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ def purge(domain)
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]
Expand Down

0 comments on commit 6149a10

Please sign in to comment.