diff --git a/app/components/layout/ChatSidebar.tsx b/app/components/layout/ChatSidebar.tsx index 68feb5b8c..f3826ecff 100644 --- a/app/components/layout/ChatSidebar.tsx +++ b/app/components/layout/ChatSidebar.tsx @@ -66,7 +66,9 @@ function RoomList({ onClose }: { onClose?: () => void }) { .filter((room) => room.expiresAt > Date.now()) .sort((a, b) => { if (a.isObsolete !== b.isObsolete) return a.isObsolete ? 1 : -1; - return 0; + const aRecency = a.lastMessageTimestamp || a.createdAt; + const bRecency = b.lastMessageTimestamp || b.createdAt; + return bRecency - aRecency; }); return (