]> cat aescling's git repositories - mastodon.git/commitdiff
Add `tootctl emoji purge` (#10481)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 6 Apr 2019 02:47:16 +0000 (04:47 +0200)
committerGitHub <noreply@github.com>
Sat, 6 Apr 2019 02:47:16 +0000 (04:47 +0200)
Fix #10441

lib/mastodon/emoji_cli.rb

index 2262040d49cbb0f0e3f8c0fc8e1a07e36497da3e..32827dd45650aa9be23bbbb1a881ced79cc4c8c9 100644 (file)
@@ -66,6 +66,12 @@ module Mastodon
       say("Imported #{imported}, skipped #{skipped}, failed to import #{failed}", color(imported, skipped, failed))
     end
 
+    desc 'purge', 'Remove all custom emoji'
+    def purge
+      CustomEmoji.in_batches.destroy_all
+      say('OK', :green)
+    end
+
     private
 
     def color(green, _yellow, red)