Allow finding group DMs by members in spotlight (#8922)
This commit is contained in:
parent
7e47749ce2
commit
d4a4eeaf63
4 changed files with 65 additions and 5 deletions
|
@ -44,7 +44,9 @@ export function roomContextDetailsText(room: Room): string {
|
|||
if (room.isSpaceRoom()) return undefined;
|
||||
|
||||
const dmPartner = DMRoomMap.shared().getUserIdForRoomId(room.roomId);
|
||||
if (dmPartner) {
|
||||
// if we’ve got more than 2 users, don’t treat it like a regular DM
|
||||
const isGroupDm = room.getMembers().length > 2;
|
||||
if (dmPartner && !isGroupDm) {
|
||||
return dmPartner;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue