fix(mattermost): honor replyToMode off for threaded messages#52543
fix(mattermost): honor replyToMode off for threaded messages#52543steipete merged 17 commits intoopenclaw:mainfrom
Conversation
docker pull ghcr.io/db4260304-ux/openclaw:main-slim
Greptile SummaryThis PR fixes a bug where incoming Mattermost messages that already belong to a thread (i.e., carry a non-empty Changes:
No issues found. The logic is minimal, correct, and the test coverage matches the bugfix. Confidence Score: 5/5
Reviews (1): Last reviewed commit: "fix(mattermost): honor replyToMode off f..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb3f032ab3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (threadRootId && params.replyToMode !== "off") { | ||
| return threadRootId; |
There was a problem hiding this comment.
Preserve inbound thread identity when replyToMode is off
Suppressing threadRootId here changes more than outbound delivery: resolveMattermostThreadSessionContext() uses the same value to build the inbound SessionKey, ParentSessionKey, ReplyToId, and MessageThreadId later in extensions/mattermost/src/mattermost/monitor.ts:1319-1337. For messages that arrive inside an existing Mattermost thread with replyToMode: "off", those fields now become top-level channel values, so separate threads collapse into one session and thread-aware flows that read ctx.MessageThreadId (for example src/auto-reply/reply/commands-core.ts:75 and src/auto-reply/reply/session.ts:413-520) can no longer target the originating thread.
Useful? React with 👍 / 👎.
|
Landed via temp rebase onto main. Thanks @RichardCao! |
Summary
replyToMode: "off"before reusing the incoming Mattermostroot_idreplyToMode: "first"and"all"Testing
pnpm test -- extensions/mattermost/src/mattermost/monitor.test.tsFixes #52350