Merge pull request #183 from 7w1/patches

Fix dm room nick names applying to non-dm rooms
This commit is contained in:
7w1 authored and GitHub committed 2026-03-05 23:19:39 -06:00
commit f9ad4d151c
2 files changed
+10 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
sable: patch
---
Fix dm room nicknames applying to non-dm private rooms.
+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));
};