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 hiyuki2578 committed Oct 2, 2019
1 parent 9afe50d commit e15472a
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 e15472a

Please sign in to comment.