chore: Handle duplicate Webhooks from slack (#9187)

* chore: Handle duplicate Webhooks from slack

* chore: fixes

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Sojan Jose
2024-04-04 17:00:45 +05:30
committed by GitHub
parent e49ef773d8
commit 5c9acfb4e9
3 changed files with 30 additions and 8 deletions

View File

@@ -16,8 +16,8 @@ class Integrations::Slack::IncomingMessageBuilder
if hook_verification?
verify_hook
elsif create_message?
create_message
elsif process_message_payload?
process_message_payload
elsif link_shared?
SlackUnfurlJob.perform_later(params)
end
@@ -67,7 +67,7 @@ class Integrations::Slack::IncomingMessageBuilder
params[:event][:thread_ts].present?
end
def create_message?
def process_message_payload?
thread_timestamp_available? && supported_message? && integration_hook
end