mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Fix un-marking rooms as DM rooms
This commit is contained in:
parent
ce40fa1a8f
commit
d19686b96d
10
src/Rooms.js
10
src/Rooms.js
@ -107,11 +107,13 @@ export function setDMRoom(roomId, userId) {
|
||||
}
|
||||
|
||||
// now add it, if it's not already there
|
||||
const roomList = dmRoomMap[userId] || [];
|
||||
if (roomList.indexOf(roomId) == -1) {
|
||||
roomList.push(roomId);
|
||||
if (userId) {
|
||||
const roomList = dmRoomMap[userId] || [];
|
||||
if (roomList.indexOf(roomId) == -1) {
|
||||
roomList.push(roomId);
|
||||
}
|
||||
dmRoomMap[userId] = roomList;
|
||||
}
|
||||
dmRoomMap[userId] = roomList;
|
||||
|
||||
|
||||
return MatrixClientPeg.get().setAccountData('m.direct', dmRoomMap);
|
||||
|
Loading…
Reference in New Issue
Block a user