Fix: Consider bot message on slack integration (#6793)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user