This commit is contained in:
2026-02-19 12:01:17 +01:00
parent b1c67f31c4
commit 00cc9635ae
2 changed files with 13 additions and 1 deletions

View File

@@ -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':

View File

@@ -113,7 +113,7 @@ class DemoChat {
console.log('Demo Chat: Response status', response.status);
const data = await response.json();
console.log('Demo Chat: Response data', data);
console.log('Demo Chat: Response data', JSON.stringify(data, null, 2));
if (data.success && data.data && data.data.ai_response) {
this.addMessageToUI('ki', data.data.ai_response);