Restructure Telegram setup around one shared secret variable
The webhook secret has to be identical in two independent systems (Cloudflare's TELEGRAM_WEBHOOK_SECRET and Telegram's setWebhook call), and the previous version had someone generate it once in prose, then type or paste it separately into two commands possibly minutes and terminal sessions apart. Nothing caught it if those two copies drifted: setWebhook still reports ok:true either way, and the bot just silently never replies to anything. Now both commands pull from one $SECRET shell variable set once at the top, in the same sequence, so there's no manual re-entry step for the actual point of failure to hide in. getWebhookInfo verification stays as the way to confirm it before assuming it works.
1 file changed+24−26
Rendering diff…