[Bug] Sending a Telegram message chain twice duplicates mentions
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
メンションは TelegramPlatformEvent.send_with_client の内部で先頭に追加されており、呼び出し元の MessageChain を変更しています。まずそこから始め、At コンポーネントのテキストが Plain コンポーネントにどのように追加されているかを確認してください。先頭に追加する前にチェーンをコピーし、その後モックの Telegram トランスポートを使って送信パスを 2 回実行してください。各リクエストに @alice のプレフィックスがちょうど 1 つ含まれていること、そして元のチェーンが変更されていないことを確認してください。
索引モデルが 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時間
- マージ済み PR(30日)
- 111
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
add entry to blockオープン
難易度 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 日以内に返信