From e56e3d187f8ddd3db72fc90c5d200f552d5c1c04 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Thu, 17 Sep 2020 12:05:45 -0500 Subject: [Filters] Merge thread muting and hiding into a single action --- app/services/mute_conversation_service.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/services/mute_conversation_service.rb') diff --git a/app/services/mute_conversation_service.rb b/app/services/mute_conversation_service.rb index 46adb98dc..56defae52 100644 --- a/app/services/mute_conversation_service.rb +++ b/app/services/mute_conversation_service.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true class MuteConversationService < BaseService - def call(account, conversation, hidden: false) + def call(account, conversation) return if account.blank? || conversation.blank? - account.mute_conversation!(conversation, hidden: hidden) - MuteConversationWorker.perform_async(account.id, conversation.id) if hidden + account.mute_conversation!(conversation) + MuteConversationWorker.perform_async(account.id, conversation.id) unless account.id == conversation.account_id end end -- cgit