diff --git a/integrations/paradiz-web/paradiz-web-agent-server.mjs b/integrations/paradiz-web/paradiz-web-agent-server.mjs index 1ee64ae..330c109 100644 --- a/integrations/paradiz-web/paradiz-web-agent-server.mjs +++ b/integrations/paradiz-web/paradiz-web-agent-server.mjs @@ -231,9 +231,15 @@ const server = http.createServer(async (req, res) => { } if (clientId && pendingBookingByClient.get(clientId) && hasContactInfo(question) && !bookingLeadSentByClient.get(clientId)) { - await sendTelegramBookingLead(question).catch(() => {}); + const sent = await sendTelegramBookingLead(question).catch(() => false); pendingBookingByClient.delete(clientId); bookingLeadSentByClient.set(clientId, true); + return json(res, 200, { + ok: true, + answer: sent + ? 'Спасибо! Передала заявку на бронь менеджеру, он свяжется с вами.' + : 'Спасибо! Контакт записала. Есть техническая задержка с уведомлением менеджера, но заявка сохранена.' + }); } if (isExternalActionRequest(question)) {