diff --git a/src/bot/index.js b/src/bot/index.js index 063a7816..297525ab 100644 --- a/src/bot/index.js +++ b/src/bot/index.js @@ -491,6 +491,11 @@ export async function initBot(config, api, tools, skills, agents) { app.post('/telegram/webhook', async (req, res) => { res.json({ ok: true }); // ack immediately try { + logger.info('📥 Webhook received:', { + update_id: req.body?.update_id, + has_message: !!req.body?.message, + type: req.body?.message?.text ? 'text' : 'other' + }); await bot.handleUpdate(req.body); } catch (e) { logger.error('Webhook update error:', { @@ -498,7 +503,8 @@ export async function initBot(config, api, tools, skills, agents) { name: e.name, stack: e.stack, body: req.body?.update_id, - full: e.toString() + full: e.toString(), + body_preview: req.body ? JSON.stringify(req.body).substring(0, 200) : 'no body' }); } });