about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/lib/command_tag/processor.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb
index a4b8490f7..0c589364d 100644
--- a/app/lib/command_tag/processor.rb
+++ b/app/lib/command_tag/processor.rb
@@ -65,6 +65,7 @@ class CommandTag::Processor
 
       unless (@status.published? && !@status.edited.zero?) || @text.present?
         execute_statements(:before_destroy)
+        @status.update(published: false)
         @status.destroy
         execute_statements(:after_destroy)
       end
@@ -217,7 +218,10 @@ class CommandTag::Processor
   end
 
   def destroy_status!
-    @status.destroy unless @status.destroyed?
+    return if @status.destroyed?
+
+    @status.update(published: false)
+    @status.destroy
   end
 
   def normalize(text)