From 309ab75d5d66795b502c86c97d0374d751762969 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Fri, 27 Mar 2026 03:51:58 +0100 Subject: [PATCH] fix: use ownerId for group DM detection in ChannelSidebar members.length > 2 caused group DMs to lose their identity when a member left and only 2 remained. ownerId is the canonical marker set at group creation and persists through the group's lifecycle. --- packages/web/src/components/layout/ChannelSidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/components/layout/ChannelSidebar.tsx b/packages/web/src/components/layout/ChannelSidebar.tsx index f300b19a..7a453b8b 100644 --- a/packages/web/src/components/layout/ChannelSidebar.tsx +++ b/packages/web/src/components/layout/ChannelSidebar.tsx @@ -492,7 +492,7 @@ export function ChannelSidebar() { {dmChannels.map((dm) => { const otherMembers = dm.members.filter(m => !isSelf(m, user)); if (otherMembers.length === 0) return null; - const isGroup = dm.members.length > 2; + const isGroup = !!dm.ownerId; const isDmUnread = unreadChannels.has(dm.id) && currentChannelId !== dm.id; const firstOtherDm = isGroup ? null : otherMembers[0];