-
-
Notifications
You must be signed in to change notification settings - Fork 69.3k
[Bug]: Mattermost inbound messages lose newlines (multi-line Markdown received as single line) #12247
Description
Summary
In Mattermost DMs, multi-line user messages (including Markdown with headings/quotes/lists) are received by OpenClaw as a single line (newlines normalized to spaces). This breaks downstream Markdown parsing and is likely the root cause of flattened lists/quotes/headings in agent-visible text.
Why this matters
If inbound characters are stripped/normalized during ingestion, OpenClaw cannot reconstruct the original Markdown structure, and any Markdown-to-IR renderer will see a single paragraph instead of block nodes.
Steps to reproduce
- In Mattermost, send a message with explicit newlines, e.g.:
line1
line2
line3
- Observe on the OpenClaw side that the received content is flattened into one line:
line1 line2 line3(or otherwise missing).
Expected behavior
OpenClaw should preserve inbound newlines exactly as sent by Mattermost so Markdown structure remains intact.
Actual behavior
Inbound messages appear normalized to a single line (newlines removed).
Environment
- Channel: Mattermost
- Clients used by reporter: Web, Desktop (Linux), Android
Related issues
- Tables wrapped in code blocks: [Bug]: Mattermost channel wraps Markdown tables in fenced code blocks instead of rendering tables #12238
- Block Markdown degraded (headings/quotes/lists/task lists): [Bug]: Mattermost channel degrades Markdown block formatting (headings/quotes/lists/task lists) #12245
Notes / Suspected cause
Possibly using the wrong field from the Mattermost WS event (e.g. a normalized/plain-text field) or performing newline normalization during message ingestion.