about summary refs log tree commit diff
path: root/app/lib/command_tag/processor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/command_tag/processor.rb')
-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 414c08638..aba7be158 100644
--- a/app/lib/command_tag/processor.rb
+++ b/app/lib/command_tag/processor.rb
@@ -58,7 +58,7 @@ class CommandTag::Processor
     @text = parse_templates(@text).rstrip
     execute_statements(:before_save)
 
-    if @text.blank? || @text.gsub(MENTIONS_OR_HASHTAGS_RE, '').strip.blank?
+    if status_text_blank?
       execute_statements(:when_blank)
 
       unless (@status.published? && !@status.edited.zero?) || @text.present?
@@ -210,6 +210,10 @@ class CommandTag::Processor
     @account.id == @parent&.account_id
   end
 
+  def status_text_blank?
+    @text.blank? || @text.gsub(MENTIONS_OR_HASHTAGS_RE, '').strip.blank?
+  end
+
   def destroy_status!
     @status.destroy unless @status.destroyed?
   end