Skip to content

Commit aeec080

Browse files
author
Jack (OpenClaw)
committed
fix(mattermost): restore threadRootId priority in resolveMattermostEffectiveReplyToId
Commit aaba1ae ("honor replyToMode off for threaded messages") added a replyToMode !== "off" guard to the threadRootId branch in resolveMattermostEffectiveReplyToId(). This conflates two concerns: 1. Session routing (should DM threads fork their own session?) 2. Reply delivery (should the bot reply inside the existing thread?) replyToMode controls (1), but the guard also kills (2): when replyToMode is "off" (the default for DMs), effectiveReplyToId becomes undefined, so all downstream call sites (typing indicators, reply delivery via resolveMattermostReplyRootId) lose the thread root. The bot then either posts to the main channel or gets a 400 Invalid RootId error. Fix: remove the replyToMode guard so threadRootId always flows through. replyToMode still controls session forking via resolveMattermostThreadSessionContext. Fixes #30977
1 parent cc7f18d commit aeec080

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/mattermost/src/mattermost/monitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export function resolveMattermostEffectiveReplyToId(params: {
175175
threadRootId?: string | null;
176176
}): string | undefined {
177177
const threadRootId = params.threadRootId?.trim();
178-
if (threadRootId && params.replyToMode !== "off") {
178+
if (threadRootId) {
179179
return threadRootId;
180180
}
181181
if (params.kind === "direct") {

0 commit comments

Comments
 (0)