mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-19 16:12:30 +00:00
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:
parent
7529482251
commit
ac3f46b799
@ -1681,9 +1681,6 @@ class FeishuChannel(BaseChannel):
|
|||||||
chat_type = message.chat_type
|
chat_type = message.chat_type
|
||||||
msg_type = message.message_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):
|
if chat_type == "group" and not self._is_group_message_for_bot(message):
|
||||||
self.logger.debug("skipping group message (not mentioned)")
|
self.logger.debug("skipping group message (not mentioned)")
|
||||||
return
|
return
|
||||||
@ -1811,6 +1808,7 @@ class FeishuChannel(BaseChannel):
|
|||||||
"thread_id": thread_id,
|
"thread_id": thread_id,
|
||||||
},
|
},
|
||||||
session_key=session_key,
|
session_key=session_key,
|
||||||
|
is_dm=chat_type == "p2p",
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user