From 6689e572f308933742e0df6f55e2ac81ca178865 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 6 Apr 2019 04:47:16 +0200 Subject: Add `tootctl emoji purge` (#10481) Fix #10441 --- lib/mastodon/emoji_cli.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/mastodon/emoji_cli.rb b/lib/mastodon/emoji_cli.rb index 2262040d4..32827dd45 100644 --- a/lib/mastodon/emoji_cli.rb +++ b/lib/mastodon/emoji_cli.rb @@ -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) -- cgit