Fix retry_decrypting_events()

This commit is contained in:
miruka 2020-03-15 16:00:29 -04:00
parent 7fd41f3eb4
commit 25101578cc
2 changed files with 11 additions and 3 deletions

View File

@ -968,11 +968,12 @@ class MatrixClient(nio.AsyncClient):
for sync_id, model in self.models.items():
if not (isinstance(sync_id, tuple) and
len(sync_id) == 3 and
sync_id[0] == self.user_id and
sync_id[2] == "events"):
continue
_, _, room_id = sync_id
_, room_id, _ = sync_id
for ev in model.values():
room = self.all_rooms[room_id]

View File

@ -36,7 +36,9 @@ HFileDialogOpener {
importing = false
callback(true)
}, (type, args) => {
}, (type, args, error, traceback, uuid) => {
let unknown = false
callback(
type === "EncryptionError" ?
false :
@ -53,8 +55,13 @@ HFileDialogOpener {
type === "PermissionError" ?
qsTr("No permission to read this file") :
(
unknown = true,
qsTr("Unknown error: %1 - %2").arg(type).arg(args)
)
)
if (unknown) utils.showError(type, traceback, uuid)
})
}
}