x
This commit is contained in:
@@ -732,6 +732,18 @@ if (!$data || empty($data)) {
|
||||
|
||||
$requestType = $data['type'] ?? 'contact';
|
||||
|
||||
// Debug endpoint to test webhook connectivity
|
||||
if ($requestType === 'test_webhook') {
|
||||
$testData = ['test' => true, 'timestamp' => date('c')];
|
||||
$result = sendToWebhook($testData, KI_CHAT_WEBHOOK_URL);
|
||||
sendResponse(true, 'Webhook test completed', [
|
||||
'webhook_url' => KI_CHAT_WEBHOOK_URL,
|
||||
'result' => $result,
|
||||
'curl_available' => function_exists('curl_init'),
|
||||
'allow_url_fopen' => ini_get('allow_url_fopen')
|
||||
]);
|
||||
}
|
||||
|
||||
try {
|
||||
switch ($requestType) {
|
||||
case 'contact':
|
||||
|
||||
Reference in New Issue
Block a user