patch dm room nicknames applying to many rooms

This commit is contained in:
7w1 committed 2026-03-05 23:15:54 -06:00
1 parent 3d243af19b
commit a4295e31ea
1 file changed
+5 -1
+5 -1
View File
@@ -27,7 +27,11 @@ export const useRoomName = (room: Room): string => {
room.recalculate();
}
const nextName = dmNickname ?? room.name;
// small room = dm i promise trust
const memberCount = room.getJoinedMemberCount();
const isSmallRoom = memberCount <= 2;
const nextName = isSmallRoom && dmNickname ? dmNickname : room.name;
setName((prev) => (prev !== nextName ? nextName : prev));
};