diff --git a/app/controllers/api/v1/accounts/integrations/slack_controller.rb b/app/controllers/api/v1/accounts/integrations/slack_controller.rb index 77cf05ade..1002f5752 100644 --- a/app/controllers/api/v1/accounts/integrations/slack_controller.rb +++ b/app/controllers/api/v1/accounts/integrations/slack_controller.rb @@ -3,7 +3,7 @@ class Api::V1::Accounts::Integrations::SlackController < Api::V1::Accounts::Base def create builder = Integrations::Slack::HookBuilder.new( - account: current_account, + account: Current.account, code: params[:code], inbox_id: params[:inbox_id] ) @@ -25,7 +25,7 @@ class Api::V1::Accounts::Integrations::SlackController < Api::V1::Accounts::Base private def fetch_hook - @hook = Integrations::Hook.find_by(app_id: 'slack') + @hook = Integrations::Hook.where(account: Current.account).find_by(app_id: 'slack') end def create_chatwoot_slack_channel diff --git a/lib/integrations/slack/send_on_slack_service.rb b/lib/integrations/slack/send_on_slack_service.rb index c024aae1a..1ec42d009 100644 --- a/lib/integrations/slack/send_on_slack_service.rb +++ b/lib/integrations/slack/send_on_slack_service.rb @@ -16,7 +16,7 @@ class Integrations::Slack::SendOnSlackService < Base::SendOnChannelService private def valid_channel_for_slack? - # slack wouldn't be an idean interface to reply to tweets, hence disabling that case + # slack wouldn't be an ideal interface to reply to tweets, hence disabling that case return false if channel.is_a?(Channel::TwitterProfile) && conversation.additional_attributes['type'] == 'tweet' true