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.
This commit is contained in:
chengyongru 2026-05-14 13:10:44 +08:00 committed by Xubin Ren
parent f47b8f0819
commit f3cae85bb1

View File

@ -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: