Files
Nexus/docs/changelog/2026-06-07-settings-telegram-detect-chat-id.md
2026-07-08 22:31:31 +08:00

887 B
Raw Permalink Blame History

Changelog — 设置页恢复 Telegram Chat ID 自动检测

日期2026-06-07

摘要

Vue SPA 设置页补回「检测 Chat ID」按钮,对接已有 GET /api/settings/telegram/chatsgetUpdates)。

动机

迁移至 frontend/src/pages/SettingsPage.vue 时仅保留 Token / Chat ID 手工输入与测试发送,遗漏旧版 settings 的 getUpdates 检测能力。

涉及文件

  • frontend/src/pages/SettingsPage.vue
  • frontend/src/types/api.ts

行为

  • 点击「检测 Chat ID」:若 Token 草稿未保存则先写入 DB,再拉取最近对话列表供选择
  • 选中后自动写入并保存 telegram_chat_id

迁移 / 重启

需重新构建前端并部署(Docker 镜像内 vite build)。

验证

设置页 → Telegram → 向 Bot 发消息后点「检测 Chat ID」→ 弹出对话列表 → 选择后 Chat ID 填入并保存。