mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
Port from openclaw/openclaw#64796: Per MSC3952 / Matrix v1.7, the m.mentions.user_ids field is the authoritative mention signal. Non- OpenClaw Matrix clients (Element, matrix-bot-sdk bots, etc.) commonly send messages with proper m.mentions.user_ids metadata but without duplicating the @bot text in the message body. Before this change, _is_bot_mentioned() relied entirely on text-based detection (body string matching and HTML pill detection), causing messages from these clients to be silently dropped when MATRIX_REQUIRE_MENTION=true. Now, if the bot's user_id appears in m.mentions.user_ids, that alone is sufficient to register a mention — matching the Matrix spec. Text-based fallback remains for backwards compatibility with older clients that don't populate m.mentions. |
||
|---|---|---|
| .. | ||
| builtin_hooks | ||
| platforms | ||
| __init__.py | ||
| channel_directory.py | ||
| config.py | ||
| delivery.py | ||
| display_config.py | ||
| hooks.py | ||
| mirror.py | ||
| pairing.py | ||
| restart.py | ||
| run.py | ||
| session.py | ||
| session_context.py | ||
| status.py | ||
| sticker_cache.py | ||
| stream_consumer.py | ||