From de284733f08e409af2821da703cf705f55f68899 Mon Sep 17 00:00:00 2001 From: viettranx Date: Tue, 3 Mar 2026 12:21:17 +0700 Subject: [PATCH] fix(feishu): mention detection fallback when botOpenID is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/channels/feishu/bot_parse.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/channels/feishu/bot_parse.go b/internal/channels/feishu/bot_parse.go index ba8fceb2..0c208b46 100644 --- a/internal/channels/feishu/bot_parse.go +++ b/internal/channels/feishu/bot_parse.go @@ -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 } }