diff --git a/CHANGELOG.md b/CHANGELOG.md index 9337658..395b16e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ 格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/)。 +## [1.0.11] - 2026-03-09 + +### 修复 Telegram 配对后无法使用的严重 Bug + +#### 修复 +- **Telegram 配置流程**: Token 保存后强制重启网关(不再可选),确保 Bot Token 立即生效后再进入配对流程 +- **Telegram 配对流程**: 配对成功后自动重启网关,确保配对关系立即生效,用户可以直接开始对话 + ## [1.0.10] - 2026-03-08 ### 新增腾讯云大模型 Coding Plan 套餐支持 diff --git a/VERSION b/VERSION index 7ee7020..59e9e60 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.10 +1.0.11 diff --git a/root/usr/share/openclaw/oc-config.sh b/root/usr/share/openclaw/oc-config.sh index 66f5bef..f5fcd8d 100755 --- a/root/usr/share/openclaw/oc-config.sh +++ b/root/usr/share/openclaw/oc-config.sh @@ -1246,8 +1246,9 @@ configure_telegram() { fi echo -e " ${GREEN}✅ Telegram Bot Token 已保存${NC}" - # 重启 Gateway 使 Token 生效 - ask_restart + # 重启 Gateway 使 Token 生效 (必须重启,否则 Bot 无法连接 Telegram) + echo -e " ${CYAN}正在重启 Gateway 使 Token 生效...${NC}" + restart_gateway # Token 保存且 Gateway 重启后,自动进入配对流程 echo "" @@ -1410,11 +1411,20 @@ telegram_pairing() { local approve=$(oc_cmd pairing approve telegram "$manual_code" 2>&1) if echo "$approve" | grep -qi "approved\|success\|ok"; then echo -e " ${GREEN}${BOLD}🎉 Telegram 配对成功!${NC}" + paired=1 else echo -e " ${YELLOW}配对失败: $approve${NC}" fi fi fi + + # 配对成功后重启网关,使配对关系立即生效 + if [ "$paired" -eq 1 ]; then + echo "" + echo -e " ${CYAN}正在重启 Gateway 使配对生效...${NC}" + restart_gateway + echo -e " ${GREEN}✅ 现在可以在 Telegram 中与 Bot 对话了!${NC}" + fi } # ══════════════════════════════════════════════════════════════