You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
fallback to room summary for dm detection
This commit is contained in:
@@ -90,8 +90,9 @@ export function looksLikeDirectMessageRoom(room, myUserId) {
|
||||
// Used for 1:1 direct chats
|
||||
// Show 1:1 chats in seperate "Direct Messages" section as long as they haven't
|
||||
// been moved to a different tag section
|
||||
// TODO: Use SUMMARYAPI to take invited users into account
|
||||
if (room.currentState.getJoinedMemberCount() === 2 && !tagNames.length) {
|
||||
const totalMemberCount = room.currentState.getJoinedMemberCount() +
|
||||
room.currentState.getInvitedMemberCount();
|
||||
if (totalMemberCount === 2 && !tagNames.length) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user