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.
This commit is contained in:
Jannis Braun
2026-03-27 03:51:58 +01:00
parent d4d160ff10
commit 309ab75d5d
@@ -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];