From 1ab409a49ebbee3c8ab55346dae757ca52c9e922 Mon Sep 17 00:00:00 2001 From: SXP-Simon Date: Wed, 25 Mar 2026 16:31:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(tg):=20=20=E5=B0=9D=E8=AF=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20Telegram=20=E5=B9=B3=E5=8F=B0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=86=E6=9E=90=E5=B0=B1=E7=BB=AA=E6=A3=80=E6=9F=A5=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E9=97=AE=E9=A2=98=20=EF=BC=88#128=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 BotManager 中增加对 Telegram 机器人 ID 提取的支持(支持 `bot.id` 属性),解决 Telegram 环境下因无法识别 Bot ID 导致的自动分析任务跳过问题。 --- src/infrastructure/platform/bot_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/infrastructure/platform/bot_manager.py b/src/infrastructure/platform/bot_manager.py index b83c8bb..7f59c91 100644 --- a/src/infrastructure/platform/bot_manager.py +++ b/src/infrastructure/platform/bot_manager.py @@ -460,6 +460,9 @@ class BotManager: # Discord.py style: client.user.id elif hasattr(bot_instance, "user") and hasattr(bot_instance.user, "id"): return str(bot_instance.user.id) + # python-telegram-bot style: bot.id + elif hasattr(bot_instance, "id") and bot_instance.id: + return str(bot_instance.id) return None def validate_for_message_fetching(self, group_id: str) -> bool: