mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-16 06:41:10 +01:00
Merge pull request #2711 from matrix-org/travis/fix-dm-invites
Make sure direct chat invites are treated as invites
This commit is contained in:
commit
f422e9db98
@ -292,11 +292,15 @@ class RoomListStore extends Store {
|
|||||||
// Stack the user's tags on top
|
// Stack the user's tags on top
|
||||||
tags.push(...this._filterTags(room.tags));
|
tags.push(...this._filterTags(room.tags));
|
||||||
|
|
||||||
|
// Order matters here: The DMRoomMap updates before invites
|
||||||
|
// are accepted, so we check to see if the room is an invite
|
||||||
|
// first, then if it is a direct chat, and finally default
|
||||||
|
// to the "recents" list.
|
||||||
const dmRoomMap = DMRoomMap.shared();
|
const dmRoomMap = DMRoomMap.shared();
|
||||||
if (dmRoomMap.getUserIdForRoomId(room.roomId)) {
|
if (myMembership === 'invite') {
|
||||||
tags.push("im.vector.fake.direct");
|
|
||||||
} else if (myMembership === 'invite') {
|
|
||||||
tags.push("im.vector.fake.invite");
|
tags.push("im.vector.fake.invite");
|
||||||
|
} else if (dmRoomMap.getUserIdForRoomId(room.roomId)) {
|
||||||
|
tags.push("im.vector.fake.direct");
|
||||||
} else if (tags.length === 0) {
|
} else if (tags.length === 0) {
|
||||||
tags.push("im.vector.fake.recent");
|
tags.push("im.vector.fake.recent");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user