release: v1.0.11 — Telegram 配对后强制重启修复

This commit is contained in:
10000ge10000
2026-03-09 21:57:29 +08:00
parent f55442b0d7
commit c553a512df
3 changed files with 21 additions and 3 deletions

View File

@@ -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 套餐支持

View File

@@ -1 +1 @@
1.0.10
1.0.11

View File

@@ -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
}
# ══════════════════════════════════════════════════════════════