From 5a472c4155ec81424b8ee8ebbecdcc9468e43090 Mon Sep 17 00:00:00 2001 From: gavrielc Date: Wed, 22 Apr 2026 00:19:23 +0300 Subject: [PATCH] fix(setup): print bot URL alongside the deep-link attempt Headless / SSH / WSL users won't have \`open\` or \`xdg-open\` wired up, so the deep-link fails silently and they have no clue where to go. Always print https://t.me/ so the URL is at least clickable or copy-pasteable from the terminal. Co-Authored-By: Claude Opus 4.7 (1M context) --- setup/add-telegram.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup/add-telegram.sh b/setup/add-telegram.sh index 8183c33..13ffaa9 100755 --- a/setup/add-telegram.sh +++ b/setup/add-telegram.sh @@ -134,21 +134,24 @@ mkdir -p data/env cp .env data/env/env # Deep-link into the bot's chat in the installed Telegram app so the user -# is already on the right screen when pair-telegram prints the code. +# is already on the right screen when pair-telegram prints the code. Also +# always print the URL so headless / remote-SSH users can open it manually. if [[ -n "$BOT_USERNAME" ]]; then + BOT_URL="https://t.me/${BOT_USERNAME}" case "$(uname -s)" in Darwin) open "tg://resolve?domain=${BOT_USERNAME}" >/dev/null 2>&1 \ - || open "https://t.me/${BOT_USERNAME}" >/dev/null 2>&1 \ + || open "$BOT_URL" >/dev/null 2>&1 \ || true ;; Linux) xdg-open "tg://resolve?domain=${BOT_USERNAME}" >/dev/null 2>&1 \ - || xdg-open "https://t.me/${BOT_USERNAME}" >/dev/null 2>&1 \ + || xdg-open "$BOT_URL" >/dev/null 2>&1 \ || true ;; esac - echo "[add-telegram] Opened Telegram → @${BOT_USERNAME}. Keep it open for the pairing code." + echo "[add-telegram] Bot chat: ${BOT_URL}" + echo "[add-telegram] (If Telegram didn't open automatically, click the link above.)" fi echo "[add-telegram] Restarting service so the new adapter picks up the token…"