openclaw - 💡(How to fix) Fix [Feature Request] 飞书多机器人 @ 精准匹配 - mention target matching [1 comments, 1 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#58664Fetched 2026-04-08 01:59:31
View on GitHub
Comments
1
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
mentioned ×2subscribed ×2

Code Example

{
  "channels": {
    "feishu": {
      "mentionTargetMatching": true,
      "groups": {
        "oc_xxx": {
          "requireMention": true,
          "mentionTargetMatching": true
        }
      }
    }
  }
}

---

{
  "channels": {
    "feishu": {
      "accounts": {
        "java-engineer": {
          "appId": "cli_xxx",
          "appSecret": "xxx",
          "botOpenId": "ou_xxx"
        }
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

问题描述

在飞书群聊中配置多个 OpenClaw 机器人时,@某个机器人,其他机器人也会同时响应。

复现步骤

  1. 在飞书群中添加多个 OpenClaw 机器人(如 Java工程师、前端工程师、产品经理)
  2. 配置 requireMention: true
  3. 发送消息 @ 其中一个机器人
  4. 观察到所有机器人都响应了

期望行为

  • @A机器人 → 只有 A 响应
  • @B机器人 → 只有 B 响应

实际行为

  • @A机器人 → A、B、C 都响应

问题原因

当前 requireMention: true 只检查消息中是否包含 @mention,但不检查 @ 的是哪个机器人。

飞书会把群消息推送给所有在群里的机器人,每个机器人收到事件后只检查"有没有 @",而不检查"有没有 @ 我"。

建议的解决方案

在配置中增加 mentionTargetMatching 选项:

{
  "channels": {
    "feishu": {
      "mentionTargetMatching": true,
      "groups": {
        "oc_xxx": {
          "requireMention": true,
          "mentionTargetMatching": true
        }
      }
    }
  }
}

或者在每个 account 配置中指定机器人的 open_id:

{
  "channels": {
    "feishu": {
      "accounts": {
        "java-engineer": {
          "appId": "cli_xxx",
          "appSecret": "xxx",
          "botOpenId": "ou_xxx"
        }
      }
    }
  }
}

环境信息

  • OpenClaw 版本: 2026.3.28
  • 平台: 飞书

临时解决方案

在群里只保留需要的机器人,把其他机器人移除。

extent analysis

TL;DR

Enable mentionTargetMatching in the configuration to ensure only the mentioned robot responds.

Guidance

  • To fix the issue, add the mentionTargetMatching option to the configuration, as suggested in the issue, to enable checking of the specific robot being mentioned.
  • Verify the fix by sending a message mentioning a specific robot and checking if only that robot responds.
  • Alternatively, specify the botOpenId for each account in the configuration to uniquely identify the robots.
  • Consider removing unnecessary robots from the group as a temporary workaround to prevent multiple robots from responding.

Example

{
  "channels": {
    "feishu": {
      "mentionTargetMatching": true,
      "groups": {
        "oc_xxx": {
          "requireMention": true,
          "mentionTargetMatching": true
        }
      }
    }
  }
}

Notes

The provided solution relies on the mentionTargetMatching option, which may have implications for the robot's behavior in other scenarios. It is essential to test the fix thoroughly to ensure it does not introduce new issues.

Recommendation

Apply the workaround by enabling mentionTargetMatching in the configuration, as it directly addresses the issue and provides a clear solution.

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

openclaw - 💡(How to fix) Fix [Feature Request] 飞书多机器人 @ 精准匹配 - mention target matching [1 comments, 1 participants]