mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-28 10:43:32 +00:00
Matrix thread-starter previews truncated long bodies by raw UTF-16 slice, which could cut an astral character (e.g. emoji) and leave a lone surrogate, rendering mojibake in the agent's thread context. Reuse the existing sliceUtf16Safe helper so the cut backs up to a valid surrogate boundary, preserving the 500-code-unit limit and '...' suffix. Adds a regression test that fails against the raw-slice implementation. Salvages the original fix from #96407 (auto-closed by the active-PR queue cap). Preserves @ly-wang19's authorship; rebased clean onto main by @Bartok9. Co-authored-by: ly-wang19 <ly-wang19@users.noreply.github.com>
OpenClaw Matrix
Official OpenClaw channel plugin for Matrix rooms and direct messages.
Install from OpenClaw:
openclaw plugin add @openclaw/matrix
Configure the Matrix homeserver and bot credentials in OpenClaw. The plugin lets agents join configured rooms, receive messages, and reply through Matrix.