Skip to content

Commit 02de778

Browse files
daveclaude
andcommitted
refactor: remove channelTypeKnown workaround (now dead code)
The early-exit guard for kind === "unknown" in handlePost (from the unknown-chat-type PR) means we never reach the threading logic with an unresolved channel type. The channelTypeKnown conditional was the old workaround for this exact scenario and is now unreachable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9e341f3 commit 02de778

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

extensions/mattermost/src/mattermost/monitor.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,11 +1220,7 @@ export async function monitorMattermostProvider(opts: MonitorMattermostOpts = {}
12201220
});
12211221

12221222
const baseSessionKey = route.sessionKey;
1223-
// Don't thread if channel lookup failed and the websocket event didn't include
1224-
// channel_type — we might be in a DM masquerading as "channel" via the
1225-
// mapMattermostChannelTypeToChatType fallback.
1226-
const channelTypeKnown = channelInfo != null || payload.data?.channel_type != null;
1227-
const threadRootId = channelTypeKnown ? (post.root_id?.trim() || undefined) : undefined;
1223+
const threadRootId = post.root_id?.trim() || undefined;
12281224
const replyToMode = resolveMattermostReplyToMode(account, kind);
12291225
const threadContext = resolveMattermostThreadSessionContext({
12301226
baseSessionKey,

0 commit comments

Comments
 (0)