You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Fix un-marking rooms as DM rooms
This commit is contained in:
@@ -107,11 +107,13 @@ export function setDMRoom(roomId, userId) {
|
||||
}
|
||||
|
||||
// now add it, if it's not already there
|
||||
if (userId) {
|
||||
const roomList = dmRoomMap[userId] || [];
|
||||
if (roomList.indexOf(roomId) == -1) {
|
||||
roomList.push(roomId);
|
||||
}
|
||||
dmRoomMap[userId] = roomList;
|
||||
}
|
||||
|
||||
|
||||
return MatrixClientPeg.get().setAccountData('m.direct', dmRoomMap);
|
||||
|
||||
Reference in New Issue
Block a user