Don't duplicate direct chats from other tags

Fixes https://github.com/vector-im/riot-web/issues/8971
This commit is contained in:
Travis Ralston 2019-03-01 15:29:24 -07:00 committed by David Baker
parent 0b0b16da5c
commit 2cd6d1ec6a

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");