mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 20:26:19 +02:00
Merge pull request #4177 from matrix-org/travis/no-rooms-dm
Fix not being able to start chats when you have no rooms
This commit is contained in:
commit
d3439c8101
@ -168,6 +168,7 @@ export default class DMRoomMap {
|
||||
}
|
||||
|
||||
getUniqueRoomsWithIndividuals(): {[userId: string]: Room} {
|
||||
if (!this.roomToUser) return {}; // No rooms means no map.
|
||||
return Object.keys(this.roomToUser)
|
||||
.map(r => ({userId: this.getUserIdForRoomId(r), room: this.matrixClient.getRoom(r)}))
|
||||
.filter(r => r.userId && r.room && r.room.getInvitedAndJoinedMemberCount() === 2)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user