← 返回
未分类

Matrix Mentions Patch

Fix OpenClaw Matrix plugin mention detection bug. Use when OpenClaw doesn't respond to @mentions in Matrix group rooms despite correct configuration. The bug...
修复 OpenClaw Matrix 插件的提及检测错误。使用场景:在配置正确的情况下,OpenClaw 仍不响应 Matrix群组房间中的 @mentions。
biociao
未分类 clawhub v1.1.1 2 版本 100000 Key: 无需
★ 0
Stars
📥 402
下载
💾 1
安装
2
版本
#latest

概述

Matrix Mentions Patch

Problem

OpenClaw Matrix plugin doesn't respond to @mentions in group rooms even when:

  • The room is configured with requireMention: true
  • The user correctly @mentions the bot (e.g., @runwheezy:matrix.biochao.cc)

Root Cause

In /home/bot/.openclaw/extensions/matrix/src/matrix/monitor/index.ts, the buildMentionRegexes function is called WITHOUT passing agentId:

// BUG: Missing agentId parameter
const mentionRegexes = core.channel.mentions.buildMentionRegexes(cfg);

Without agentId, the function can't resolve agent-specific mention patterns from config, causing mentions to never be detected.

Fix

Edit /home/bot/.openclaw/extensions/matrix/src/matrix/monitor/index.ts:

Find line ~298:

const mentionRegexes = core.channel.mentions.buildMentionRegexes(cfg);

Change to:

const mentionRegexes = core.channel.mentions.buildMentionRegexes(cfg, "main");

Replace "main" with your actual agent ID if different.

Apply

  1. Make the edit above
  2. Restart OpenClaw gateway: openclaw gateway restart

The fix loads immediately - no rebuild needed since the extension is loaded dynamically.

版本历史

共 2 个版本

  • v1.1.1 当前
    2026-05-21 13:29 安全 安全
  • v1.1.0
    2026-05-07 05:39 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Agent Onboarding

biociao
新成员加入群聊后的快速上手指南。当新 agent 加入 Meeting 群或任何项目群时,使用此 skill 指导其:更新自己的 AGENTS.md、建立群组笔记、掌握发言规范、搭建设记忆体系。触发场景:被要求"教新成员"、"更新 AGEN
★ 0 📥 350

Agent Progressive Memory

biociao
群聊渐进式记忆披露协议。当 Agent 需要在群聊/团队/项目协作场景中访问历史记忆时启用。避免 Agent 一次性加载所有记忆或跳过索引直接读取子目录。不适用于单次、无群聊场景的标准问答。
★ 0 📥 456

Hogwarts Magical Claw for Research Laboratory

biociao
AI科研团队智能协作助手。用于:(1) 管理团队知识库和项目进度追踪 (2) 协助会议纪要整理、文献综述、实验记录 (3) 代码辅助和数据分析 (4) 按团队协议执行日/周工作循环。当团队成员在Issue、PR或即时通讯中@AI,或需要知识
★ 0 📥 514