add warning in console when patching rooms, so it appears in rage shakes

pull/21833/head
Bruno Windels 2018-09-04 13:07:45 +02:00
parent 441036ff93
commit 6c7cb380e0
1 changed files with 2 additions and 0 deletions

View File

@ -81,6 +81,8 @@ export default class DMRoomMap {
// to avoid multiple devices fighting to correct // to avoid multiple devices fighting to correct
// the account data, only try to send the corrected // the account data, only try to send the corrected
// version once. // version once.
console.warn(`Invalid m.direct account data detected ` +
`(self-chats that shouldn't be), patching it up.`);
if (neededPatching && !this._hasSentOutPatchDirectAccountDataPatch) { if (neededPatching && !this._hasSentOutPatchDirectAccountDataPatch) {
this._hasSentOutPatchDirectAccountDataPatch = true; this._hasSentOutPatchDirectAccountDataPatch = true;
this.matrixClient.setAccountData('m.direct', userToRooms); this.matrixClient.setAccountData('m.direct', userToRooms);