fix(group): supergroup 跨 Bot reply 改用 reply_parameters (Bot API v6.7+)
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
舊的 reply_to_message_id 在 supergroup 跨 Bot 回覆會 400 改用 reply_parameters + allow_sending_without_reply: true Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2593,8 +2593,13 @@ class TelegramGateway:
|
||||
"text": text[:4096],
|
||||
"parse_mode": parse_mode,
|
||||
}
|
||||
# 2026-04-03 ogt: supergroup 跨 Bot reply 需用 reply_parameters (Bot API v6.7+)
|
||||
# 舊的 reply_to_message_id 在 supergroup 會 400,改用新格式 + allow_sending_without_reply
|
||||
if reply_to_message_id:
|
||||
payload["reply_to_message_id"] = reply_to_message_id
|
||||
payload["reply_parameters"] = {
|
||||
"message_id": reply_to_message_id,
|
||||
"allow_sending_without_reply": True,
|
||||
}
|
||||
|
||||
response = await self._http_client.post(url, json=payload)
|
||||
response.raise_for_status()
|
||||
|
||||
Reference in New Issue
Block a user