[Bug] Sending a Telegram message chain twice duplicates mentions
维护者通常 1 天内回复
评估
调研方向
提及内容是在 TelegramPlatformEvent.send_with_client 中前置添加的,这会修改调用方的 MessageChain。请从这里开始,检查 At 组件的文本是如何添加到 Plain 组件中的。在前置添加之前复制该链,然后使用模拟的 Telegram 传输层运行两次发送路径。确认每个请求只包含一个 @alice 前缀,并且原始链保持不变。
由索引模型根据 Issue 内容生成。
描述
Bug description
The Telegram adapter prepends an At mention directly to the caller's Plain.text. A plugin that sends one MessageChain twice (for example, broadcasting a shared notice or retrying delivery) gets duplicate mentions in the second message. The original chain is also changed for subsequent use.
Reproduction
Create MessageChain([At(qq=1234, name="alice"), Plain("Please review")]) and call TelegramPlatformEvent.send_with_client twice with the same chain. A mock Telegram bot is enough to observe the outgoing requests.
Expected result
Each request sends @alice Please review, and the chain's plain component still contains Please review.
Actual result
The second request sends @alice @alice Please review. The component text now contains both prefixes.
Environment
Source at 23db1ad08064a8330a09077138ce8ecc05362219, Python 3.12, macOS. Reproduced with the production send method and the repository's mock Telegram transport.
- 主要语言
- Python
- 星标
- 46.4k
- 派生
- 3.4k
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 111
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AstrBotDevs/AstrBot 的其他 Issue
-
[Bug] Telegram album debounce exceeds the maximum wait可能已有人在做 @123XieC 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
AstrBotDevs/AstrBot#11123 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
AstrBotDevs/AstrBot#11038 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
AstrBotDevs/AstrBot#11034 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
AstrBotDevs/AstrBot#10999 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug] OpenAI-compatible Gemini 工具 schema const 导致 400可能已有人在做 @arccat-114 于 21 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 77/100
AstrBotDevs/AstrBot#10720 · 1 条评论 ·
维护者通常 1 天内回复
查看 AstrBotDevs/AstrBot 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"可能已有人在做 @0z5a 今天认领。 未关闭needs-triage
难度 2/5 半天 新手友好度 72/100
维护者通常 2 天内回复
-
plot_graph crashes when a mesh node has no m2m edge可能已有人在做 @tygvi 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
mllam/neural-lam#883 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
future-agi/future-agi#4092 · 1 条评论 ·
维护者通常 1 天内回复
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld whole未关闭
难度 1/5 1 小时以内 新手友好度 82/100
WingedGuardian/GENesis-AGI#4641 ·
维护者通常 1 天内回复