Files
Nexus/docs/audit/2026-06-13-telegram-chat-id-group-detect.md
T

34 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 审计 — Telegram 群聊 Chat ID 检测
**Changelog**: `docs/changelog/2026-06-13-telegram-chat-id-group-detect.md`
## 审计范围
| 文件 | 变更 | 状态 |
|------|------|------|
| `server/api/settings.py` | `_extract_chats_from_telegram_updates`、群聊更新类型 | ☑ |
| `frontend/src/pages/SettingsPage.vue` | 群聊检测说明与类型标签 | ☑ |
| `tests/test_settings_telegram.py` | my_chat_member / callback 单测 | ☑ |
## Step 3 规则扫描
| H | 规则 | 结论 |
|---|------|------|
| H1 | Token 仍经既有 settings 鉴权 | SAFE — 未改 auth |
| H2 | getUpdates 仍先清 webhook | SAFE — `_telegram_clear_webhook_if_set` |
| H3 | 不泄露其他用户 chat | SAFE — 仅返回去重 chat 元数据 |
| H4 | 群聊隐私模式说明 | SAFE — UI 提示 `/start@Bot` |
## Closure
| H | 判定 | 依据 |
|---|------|------|
| H1H4 | SAFE | `pytest tests/test_settings_telegram.py` 8/8 |
## DoD
- [x] `pytest tests/test_settings_telegram.py` passed
- [x] changelog / audit
- [x] 无密钥类 settings 变更
- [x] 前端 build 由部署脚本执行