fix(mattermost): prioritize threadRootId over kind===direct for DM thread replies [fixes #59758]#59791
Conversation
Greptile SummaryThis PR adds a clarifying comment and a new test case to Confidence Score: 5/5
Reviews (1): Last reviewed commit: "fix(mattermost): prioritize threadRootId..." | Re-trigger Greptile |
|
Closing this as implemented after Codex review. Current What I checked:
So I’m closing this as already implemented rather than keeping a duplicate issue open. Review notes: reviewed against ec3dbd22a4de; fix evidence: commit a9797214338b. |
Fixes #59758
What
In Mattermost, when a DM opens a thread and the user replies within that thread, the reply was incorrectly going to a new thread instead of staying in the existing thread.
How
The
resolveMattermostEffectiveReplyToIdfunction now checksthreadRootIdfirst, before falling through tokind===directlogic. A DM Thread message should reply to the thread — only fall through to direct-message logic when there is nothreadRootId.Added a test case that verifies a
directmessage with athreadRootIdcorrectly returns thethreadRootId.