From f3cae85bb12293bf53ceb3ed506ac8891160f9a9 Mon Sep 17 00:00:00 2001 From: chengyongru Date: Thu, 14 May 2026 13:10:44 +0800 Subject: [PATCH] fix(feishu): propagate is_dm and remove early is_allowed check Feishu was doing its own is_allowed check before _handle_message without considering is_dm, so unrecognised p2p senders were silently ignored instead of receiving a pairing code. - Remove the early self.is_allowed() return so BaseChannel can handle permission checks and pairing uniformly. - Pass is_dm=chat_type == "p2p" to _handle_message so DM pairing works for Feishu/Lark private chats. --- nanobot/channels/feishu.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nanobot/channels/feishu.py b/nanobot/channels/feishu.py index efdb17fdf..83f9a6ccc 100644 --- a/nanobot/channels/feishu.py +++ b/nanobot/channels/feishu.py @@ -1699,9 +1699,6 @@ class FeishuChannel(BaseChannel): chat_type = message.chat_type msg_type = message.message_type - if not self.is_allowed(sender_id): - return - if chat_type == "group" and not self._is_group_message_for_bot(message): self.logger.debug("skipping group message (not mentioned)") return @@ -1829,6 +1826,7 @@ class FeishuChannel(BaseChannel): "thread_id": thread_id, }, session_key=session_key, + is_dm=chat_type == "p2p", ) except Exception: