mirror of https://github.com/openclaw/openclaw.git
* fix(matrix): detect mentions in formatted_body matrix.to links
Many Matrix clients (including Element) send mentions using HTML links
in formatted_body instead of or in addition to the m.mentions field:
```json
{
"formatted_body": "<a href=\"https://matrix.to/#/@bot:matrix.org\">Bot</a>: hello",
"m.mentions": null
}
```
This change adds detection for matrix.to links in formatted_body,
supporting both plain and URL-encoded user IDs.
Changes:
- Add checkFormattedBodyMention() helper function
- Check formatted_body in resolveMentions()
- Add comprehensive test coverage
Fixes #6982
* Update extensions/matrix/src/matrix/monitor/mentions.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
---------
Co-authored-by: zerone0x <zerone0x@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| matrix | ||
| actions.ts | ||
| channel.directory.test.ts | ||
| channel.ts | ||
| config-schema.ts | ||
| directory-live.test.ts | ||
| directory-live.ts | ||
| group-mentions.ts | ||
| onboarding.ts | ||
| outbound.ts | ||
| resolve-targets.test.ts | ||
| resolve-targets.ts | ||
| runtime.ts | ||
| tool-actions.ts | ||
| types.ts | ||