openclaw - 💡(How to fix) Fix Feishu plugin: @_all (mention all) treated as bot mention, requireMention bypassed [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73408Fetched 2026-04-29 06:20:19
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1mentioned ×1subscribed ×1

When requireMention: true is configured for a Feishu account, the plugin should only respond to messages that explicitly @mention the bot. However, messages with @_all (mention all) are incorrectly treated as bot mentions, causing the bot to respond when it should not.

Root Cause

In extensions/feishu/monitor-CHPxutCS.js, the checkBotMentioned function (line 147-154):

function checkBotMentioned(event, botOpenId) {
    if (!botOpenId) return false;
    if ((event.message.content ?? "").includes("@_all")) return true;  // ← BUG
    const mentions = event.message.mentions ?? [];
    if (mentions.length > 0) return mentions.some((mention) => mention.id.open_id === botOpenId);
    // ...
}

Line 149: if ((event.message.content ?? "").includes("@_all")) return true;

This causes @_all to bypass the precise bot mention check on line 151.

Code Example

function checkBotMentioned(event, botOpenId) {
    if (!botOpenId) return false;
    if ((event.message.content ?? "").includes("@_all")) return true;  // ← BUG
    const mentions = event.message.mentions ?? [];
    if (mentions.length > 0) return mentions.some((mention) => mention.id.open_id === botOpenId);
    // ...
}

---

if (mentions.length > 0) return mentions.some((mention) => mention.id.open_id === botOpenId);
RAW_BUFFERClick to expand / collapse

Description

When requireMention: true is configured for a Feishu account, the plugin should only respond to messages that explicitly @mention the bot. However, messages with @_all (mention all) are incorrectly treated as bot mentions, causing the bot to respond when it should not.

Root Cause

In extensions/feishu/monitor-CHPxutCS.js, the checkBotMentioned function (line 147-154):

function checkBotMentioned(event, botOpenId) {
    if (!botOpenId) return false;
    if ((event.message.content ?? "").includes("@_all")) return true;  // ← BUG
    const mentions = event.message.mentions ?? [];
    if (mentions.length > 0) return mentions.some((mention) => mention.id.open_id === botOpenId);
    // ...
}

Line 149: if ((event.message.content ?? "").includes("@_all")) return true;

This causes @_all to bypass the precise bot mention check on line 151.

Expected Behavior

@_all should NOT be treated as a bot mention. Only explicit mentions of the bot's open_id in the mentions array should count as a bot mention.

Suggested Fix

Remove or comment out line 149. The existing logic on line 151 already correctly checks if the bot is in the mentions list:

if (mentions.length > 0) return mentions.some((mention) => mention.id.open_id === botOpenId);

Environment

  • Platform: Feishu
  • Config: "requireMention": true under channels.feishu

extent analysis

TL;DR

Remove or comment out the line if ((event.message.content ?? "").includes("@_all")) return true; in the checkBotMentioned function to fix the incorrect bot mention detection.

Guidance

  • Identify the checkBotMentioned function in extensions/feishu/monitor-CHPxutCS.js and locate the problematic line 149.
  • Remove or comment out the line to prevent @_all mentions from being treated as bot mentions.
  • Verify the fix by testing the bot's response to messages with @_all and explicit bot mentions.
  • Ensure the requireMention configuration is set to true under channels.feishu to test the corrected behavior.

Example

function checkBotMentioned(event, botOpenId) {
    if (!botOpenId) return false;
    // Remove or comment out the following line
    // if ((event.message.content ?? "").includes("@_all")) return true;
    const mentions = event.message.mentions ?? [];
    if (mentions.length > 0) return mentions.some((mention) => mention.id.open_id === botOpenId);
    // ...
}

Notes

This fix assumes that the existing logic on line 151 correctly checks for bot mentions in the mentions array. If issues persist, further debugging may be necessary.

Recommendation

Apply the workaround by removing or commenting out the problematic line, as it directly addresses the root cause of the issue and ensures correct bot mention detection.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING