diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-31 01:27:35 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:16 -0500 |
commit | a0ae00eeb5b89ccd23868e530608fbbc07349a7e (patch) | |
tree | 38041d00a95d10606c92bc0cd2dc8f2152d93f9b /app/lib/command_tag/commands | |
parent | 45e04f00db91cc2956707a84a87dfdfce05363e4 (diff) |
[Command Tags] Allow using #!publish with currrent roar if it contains a body beyond mentions and hashtags
Diffstat (limited to 'app/lib/command_tag/commands')
-rw-r--r-- | app/lib/command_tag/commands/parent_status_tools.rb | 5 |
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? |