about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/lib/bangtags.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index 8d61ca440..9a1b74512 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -27,6 +27,8 @@ class Bangtags
       'quit' => ['thread'],
       'kick' => ['thread'],
       'unkick' => ['thread'],
+
+      'publish' => ['parent'],
     }
 
     @aliases = {
@@ -551,6 +553,13 @@ class Bangtags
             media_ids = @parent_status.media_attachments.pluck(:id)
             BatchFetchMediaWorker.perform_async(media_ids) unless media_ids.empty?
             FetchAvatarWorker.perform_async(@parent_status.account.id)
+
+          when 'publish'
+            chunk = nil
+            del_tags(@parent_status, 'self.draft', 'draft')
+            Bangtags.new(@parent_status).process
+            @parent_status.save
+            PostStatusWorker.perform_async(@parent_status.id, hidden: false, process_mentions: true)
           end
 
         when 'media'