feat: Mark the messages as failed if the API channel webhooks fail for any reason. (#8277)

This commit is contained in:
Muhsin Keloth
2023-11-04 12:26:28 +05:30
committed by GitHub
parent 3b84b0fc47
commit b4d20689b7
7 changed files with 129 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
class WebhookJob < ApplicationJob
queue_as :medium
def perform(url, payload)
Webhooks::Trigger.execute(url, payload)
# There are 3 types of webhooks, account, inbox and agent_bot
def perform(url, payload, webhook_type = :account_webhook)
Webhooks::Trigger.execute(url, payload, webhook_type)
end
end