mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 12:58:53 +03:00
dont reassign userToRooms as we're just patching it up, also better check if we really have self DMs
This commit is contained in:
parent
caff60d56d
commit
379ddfff29
1 changed files with 3 additions and 2 deletions
|
@ -72,8 +72,9 @@ export default class DMRoomMap {
|
|||
if (ev.getType() == 'm.direct') {
|
||||
let userToRooms = this.matrixClient.getAccountData('m.direct').getContent();
|
||||
const myUserId = this.matrixClient.getUserId();
|
||||
if (userToRooms[myUserId]) {
|
||||
userToRooms = this._patchUpSelfDMs(userToRooms);
|
||||
const selfDMs = userToRooms[myUserId];
|
||||
if (selfDMs && selfDMs.length) {
|
||||
this._patchUpSelfDMs(userToRooms);
|
||||
this.matrixClient.setAccountData('m.direct', userToRooms);
|
||||
}
|
||||
this.userToRooms = userToRooms;
|
||||
|
|
Loading…
Reference in a new issue