Fix: Consider bot message on slack integration (#6793)

This commit is contained in:
Tejaswini Chile
2023-03-31 18:56:51 +05:30
committed by GitHub
parent bd5ff7a8bf
commit 21da03fe5b
7 changed files with 48 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ class Integrations::Slack::SendOnSlackService < Base::SendOnChannelService
# we don't want message loop in slack
return if message.external_source_id_slack.present?
# we don't want to start slack thread from agent conversation as of now
return if message.outgoing? && conversation.identifier.blank?
return if invalid_message?
perform_reply
end
@@ -23,6 +23,10 @@ class Integrations::Slack::SendOnSlackService < Base::SendOnChannelService
true
end
def invalid_message?
(message.outgoing? && conversation.identifier.blank?) || !message.slack_hook_sendable?
end
def perform_reply
send_message