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
+1
View File
@@ -18,6 +18,7 @@ class HookJob < ApplicationJob
return unless ['message.created'].include?(event_name)
message = event_data[:message]
Integrations::Slack::SendOnSlackService.new(message: message, hook: hook).perform
end
-2
View File
@@ -1,14 +1,12 @@
class HookListener < BaseListener
def message_created(event)
message = extract_message_and_account(event)[0]
return unless message.webhook_sendable?
execute_hooks(event, message)
end
def message_updated(event)
message = extract_message_and_account(event)[0]
return unless message.webhook_sendable?
execute_hooks(event, message)
end
@@ -9,6 +9,10 @@ module MessageFilterHelpers
incoming? || outgoing?
end
def slack_hook_sendable?
incoming? || outgoing? || template?
end
def notifiable?
incoming? || outgoing?
end