diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-24 04:38:43 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:15 -0500 |
commit | 4b229e11d875d1a57a381eeb1a5d9ec9f72ec503 (patch) | |
tree | 87283bbd03b79be66d4ee71f19d998050075c182 /app/lib/command_tag/commands/parent_status_tools.rb | |
parent | 48e527317f00563c430c73b72304ba74deb5622b (diff) |
[Command Tags] Preload statement handlers
Diffstat (limited to 'app/lib/command_tag/commands/parent_status_tools.rb')
-rw-r--r-- | app/lib/command_tag/commands/parent_status_tools.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/app/lib/command_tag/commands/parent_status_tools.rb b/app/lib/command_tag/commands/parent_status_tools.rb index df3cd06c6..ab917e8f5 100644 --- a/app/lib/command_tag/commands/parent_status_tools.rb +++ b/app/lib/command_tag/commands/parent_status_tools.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true - -# rubocop:disable Layout/ExtraSpacing module CommandTag::Commands::ParentStatusTools - def handle_publish_once_at_end + def handle_publish_once_at_end(_) return unless author_of_parent? && !@parent.published? PublishStatusService.new.call(@parent) @@ -13,7 +11,7 @@ module CommandTag::Commands::ParentStatusTools 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 + def handle_edit_once_before_save(_) return unless author_of_parent? params = @parent.slice(*UpdateStatusService::ALLOWED_ATTRIBUTES).with_indifferent_access.compact @@ -27,7 +25,7 @@ module CommandTag::Commands::ParentStatusTools alias handle_edit_toot_once_before_save handle_edit_once_before_save alias handle_edit_parent_once_before_save handle_edit_once_before_save - def handle_mute_once_at_end + def handle_mute_once_at_end(_) return if author_of_parent? MuteStatusService.new.call(@account, @parent) @@ -43,7 +41,7 @@ module CommandTag::Commands::ParentStatusTools alias handle_hide_toot_once_at_end handle_mute_once_at_end alias handle_hide_parent_once_at_end handle_mute_once_at_end - def handle_unmute_once_at_end + def handle_unmute_once_at_end(_) return if author_of_parent? @account.unmute_status!(@parent) @@ -59,7 +57,7 @@ module CommandTag::Commands::ParentStatusTools alias handle_unhide_toot_once_at_end handle_unmute_once_at_end alias handle_unhide_parent_once_at_end handle_unmute_once_at_end - def handle_mute_thread_once_at_end + def handle_mute_thread_once_at_end(_) return if author_of_parent? MuteConversationService.new.call(@account, @conversation) @@ -69,7 +67,7 @@ module CommandTag::Commands::ParentStatusTools alias handle_hide_thread_once_at_end handle_mute_thread_once_at_end alias handle_hide_conversation_once_at_end handle_mute_thread_once_at_end - def handle_unmute_thread_once_at_end + def handle_unmute_thread_once_at_end(_) return if author_of_parent? || @conversation.blank? @account.unmute_conversation!(@conversation) @@ -79,4 +77,3 @@ module CommandTag::Commands::ParentStatusTools alias handle_unhide_thread_once_at_end handle_unmute_thread_once_at_end alias handle_unhide_conversation_once_at_end handle_unmute_thread_once_at_end end -# rubocop:enable Layout/ExtraSpacing |