Skip to content

Commit 6ddd3b3

Browse files
committed
fix(mattermost): coerce null accountId to undefined for cache lookup
Fixes TS2345: params.accountId is string | null | undefined but getMattermostChannelKind expects string | undefined.
1 parent 6494813 commit 6ddd3b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/mattermost/src/session-route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function resolveMattermostOutboundSessionRoute(params: ChannelOutboundSes
3434
// as group. When the monitor has resolved the channel type, the cache
3535
// entry carries the authoritative Mattermost channel kind (D→direct,
3636
// G/P→group, O→channel).
37-
const cachedKind = mattermostChannelKindCache.get(rawId, params.accountId);
37+
const cachedKind = mattermostChannelKindCache.get(rawId, params.accountId ?? undefined);
3838
const chatType = isUser ? "direct" : cachedKind === "group" ? "group" : "channel";
3939
// Align peer kind, from, and to with the resolved chatType so that
4040
// private-channel group routes share the same session-key namespace.

0 commit comments

Comments
 (0)