Skip to content

[Bug]:Mattermost: DM replies thread despite replyToMode "off" (docs say DMs stay non-threaded) #59981

@Stevetaiapa1967

Description

@Stevetaiapa1967

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Mattermost DM auto-replies are sent with a non-empty root_id, creating threads in the DM channel, despite documentation stating that direct messages ignore replyToMode and stay non-threaded.

Steps to reproduce

  1. Install @openclaw/mattermost plugin
  2. Configure with dmPolicy: "open" and replyToMode: "off"
  3. Send a DM to the bot from a Mattermost user
  4. Observe the bot's auto-reply via GET /api/v4/channels/{dm_channel_id}/posts
  5. Note that the reply post has a non-empty root_id matching the triggering post ID
  6. In the Mattermost client, the reply appears as a thread rather than in the main DM body

Expected behavior

DM replies land in the main channel body with root_id empty.
Documentation explicitly states: "Direct messages ignore this setting
and stay non-threaded."

Actual behavior

Bot auto-replies are sent with a non-empty root_id set to the
triggering post ID, creating a thread in the DM. The main channel
body appears empty to the user. Confirmed via Mattermost REST API:
GET /api/v4/channels/{dm_channel_id}/posts shows root_id populated
on all bot replies.

OpenClaw version

2026.4.2

Operating system

Mac OS 15.7.4

Install method

Installed via npm globally

Model

anthropic 4.6

Provider / routing chain

Claude Sonnet 4.6

Additional provider/model setup details

Plugin: @openclaw/mattermost
Config: replyToMode: "off", dmPolicy: "open"

Expected: DM auto-replies land in the main channel body. Docs state "Direct messages ignore this setting and stay non-threaded."

Actual: Auto-replies are sent with a non-empty root_id, creating a thread in the DM conversation. Confirmed via Mattermost API — posts show root_id set to the triggering post ID.

The resolveMattermostReplyToMode function correctly returns "off" for direct kind, but payload.replyToId still gets passed through to root_id in the outbound post via resolveMattermostReplyRootId.

This makes DM conversations unusable as the main channel body appears empty to the user.

Logs, screenshots, and evidence

Impact and severity

unable to communicate effectively

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions