Merge pull request #183 from 7w1/patches
Fix dm room nick names applying to non-dm rooms
This commit is contained in:
2 files changed
+10
-1
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
---
|
||||
|
||||
Fix dm room nicknames applying to non-dm private rooms.
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user