From d8331203a95766fb94a6136ea5156a4d7d1ddb2c Mon Sep 17 00:00:00 2001 From: SamNet-dev Date: Tue, 10 Feb 2026 11:41:55 -0600 Subject: [PATCH] fix: Clear webhook before polling getUpdates in Telegram setup If a bot token previously had a webhook configured (e.g. from a prior install), getUpdates returns nothing and chat ID detection fails. Adding deleteWebhook call before polling fixes fresh installs that reuse an existing bot token. --- conduit.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conduit.sh b/conduit.sh index 52f4387..ea5672b 100644 --- a/conduit.sh +++ b/conduit.sh @@ -5642,6 +5642,8 @@ ${report}" } telegram_get_chat_id() { + # Clear any existing webhook so getUpdates works + curl -s --max-time 5 "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/deleteWebhook" &>/dev/null local response response=$(curl -s --max-time 10 --max-filesize 1048576 "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/getUpdates" 2>/dev/null) [ -z "$response" ] && return 1