This commit is contained in:
@@ -28,7 +28,7 @@ async function waitForGateway() {
|
||||
log('info', '🟢 nucleo-whatsapp ready');
|
||||
return;
|
||||
} catch {
|
||||
log('warn', `Gateway not responding (attempt ${i}/${config.MAX_ATTEMPTS})…`);
|
||||
log('warn', `Gateway not responding`,' connecting to: ', openWaUrl, ` (attempt ${i}/${config.MAX_ATTEMPTS})…`);
|
||||
await new Promise(r => setTimeout(r, config.RETRY_MS));
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ async function registerWebhook() {
|
||||
app.use(express.json());
|
||||
|
||||
app.post('/webhook', async (req: express.Request, res: express.Response) => {
|
||||
log('info', 'webhook received');
|
||||
log('info', 'webhook received', req.body);
|
||||
|
||||
const { message, text, from } = req.body as { message?: WhatsAppMessage; text?: string; from?: string };
|
||||
const incoming = message || text;
|
||||
|
||||
Reference in New Issue
Block a user