feat: Customizable webhook timeout configuration (#12777)

## Summary
- Ability to configure the webhook timeout for Chatwoot self hosted
installations

fixes: https://github.com/chatwoot/chatwoot/issues/12754
This commit is contained in:
Sojan Jose
2025-11-17 14:43:23 -08:00
committed by GitHub
parent bf806f0c28
commit 5b56f64838
4 changed files with 61 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ class Webhooks::Trigger
url: @url,
payload: @payload.to_json,
headers: { content_type: :json, accept: :json },
timeout: 5
timeout: webhook_timeout
)
end
@@ -73,4 +73,11 @@ class Webhooks::Trigger
def message_id
@payload[:id]
end
def webhook_timeout
raw_timeout = GlobalConfig.get_value('WEBHOOK_TIMEOUT')
timeout = raw_timeout.presence&.to_i
timeout&.positive? ? timeout : 5
end
end