diff --git a/extensions/mattermost/src/mattermost/monitor.ts b/extensions/mattermost/src/mattermost/monitor.ts index 433e01e49..e468b2ea3 100644 --- a/extensions/mattermost/src/mattermost/monitor.ts +++ b/extensions/mattermost/src/mattermost/monitor.ts @@ -516,7 +516,7 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {} }); const baseSessionKey = route.sessionKey; - const threadRootId = post.root_id?.trim() || undefined; + const threadRootId = post.root_id?.trim() || (kind !== "dm" ? post.id : undefined); const threadKeys = resolveThreadSessionKeys({ baseSessionKey, threadId: threadRootId,