mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-14 04:16:06 +00:00
fix(feishu): mention detection fallback when botOpenID is empty
If probeBotInfo fails (missing bot:read permission), botOpenID is empty and mention detection always returns false — causing all group messages to be silently recorded to history instead of processed. Now treats any mention as bot mention when botOpenID is unknown. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
7106a74212
commit
de284733f0
1 file changed
+4
-2
@@ -36,8 +36,10 @@ func (c *Channel) parseMessageEvent(event *MessageEvent) *messageContext {
|
||||
}
|
||||
mentions = append(mentions, mi)
|
||||
|
||||
// Check if bot is mentioned
|
||||
if c.botOpenID != "" && mi.OpenID == c.botOpenID {
|
||||
// Check if bot is mentioned.
|
||||
// If botOpenID is known, match exactly; otherwise treat any mention as bot mention
|
||||
// (fallback when probeBotInfo fails — better to process than silently drop).
|
||||
if c.botOpenID == "" || mi.OpenID == c.botOpenID {
|
||||
mentionedBot = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user