From 6141b950377de035ce5b7ced244ae2047624c198 Mon Sep 17 00:00:00 2001 From: Re-bin Date: Thu, 12 Mar 2026 06:00:39 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20feishu=20bot=20mention=20detection=20?= =?UTF-8?q?=E2=80=94=20user=5Fid=20can=20be=20None,=20not=20just=20empty?= =?UTF-8?q?=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nanobot/channels/feishu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nanobot/channels/feishu.py b/nanobot/channels/feishu.py index 780227a..2eb6a6a 100644 --- a/nanobot/channels/feishu.py +++ b/nanobot/channels/feishu.py @@ -362,8 +362,8 @@ class FeishuChannel(BaseChannel): mid = getattr(mention, "id", None) if not mid: continue - # Bot mentions have an empty user_id with a valid open_id - if getattr(mid, "user_id", None) == "" and (getattr(mid, "open_id", None) or "").startswith("ou_"): + # Bot mentions have no user_id (None or "") but a valid open_id + if not getattr(mid, "user_id", None) and (getattr(mid, "open_id", None) or "").startswith("ou_"): return True return False