about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/lib/command_tag/commands/parent_status_tools.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/lib/command_tag/commands/parent_status_tools.rb b/app/lib/command_tag/commands/parent_status_tools.rb
index ab917e8f5..d19cf902b 100644
--- a/app/lib/command_tag/commands/parent_status_tools.rb
+++ b/app/lib/command_tag/commands/parent_status_tools.rb
@@ -1,7 +1,9 @@
 # frozen_string_literal: true
 module CommandTag::Commands::ParentStatusTools
   def handle_publish_once_at_end(_)
-    return unless author_of_parent? && !@parent.published?
+    is_blank = status_text_blank?
+    @status.published = true if @parent.blank? || !is_blank?
+    return unless is_blank && author_of_parent? && !@parent.published?
 
     PublishStatusService.new.call(@parent)
   end
@@ -9,7 +11,6 @@ module CommandTag::Commands::ParentStatusTools
   alias handle_publish_post_once_at_end                   handle_publish_once_at_end
   alias handle_publish_roar_once_at_end                   handle_publish_once_at_end
   alias handle_publish_toot_once_at_end                   handle_publish_once_at_end
-  alias handle_publish_parent_once_at_end                 handle_publish_once_at_end
 
   def handle_edit_once_before_save(_)
     return unless author_of_parent?