Merge pull request #2762 from matrix-org/dbkr/duplicated-people

Don't duplicate direct chats from other tags
This commit is contained in:
David Baker 2019-03-06 15:39:45 +00:00 committed by GitHub
commit 1ed485b5b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -319,7 +319,9 @@ class RoomListStore extends Store {
const dmRoomMap = DMRoomMap.shared();
if (myMembership === 'invite') {
tags.push("im.vector.fake.invite");
} else if (dmRoomMap.getUserIdForRoomId(room.roomId)) {
} else if (dmRoomMap.getUserIdForRoomId(room.roomId) && tags.length === 0) {
// We intentionally don't duplicate rooms in other tags into the people list
// as a feature.
tags.push("im.vector.fake.direct");
} else if (tags.length === 0) {
tags.push("im.vector.fake.recent");