fix: Wait for keys in pusher
This commit is contained in:
parent
6d9d1a3bd7
commit
b7e0d10b5a
|
|
@ -1088,11 +1088,13 @@ class Client extends MatrixApi {
|
||||||
|
|
||||||
final encryption = this.encryption;
|
final encryption = this.encryption;
|
||||||
if (event.type == EventTypes.Encrypted && encryption != null) {
|
if (event.type == EventTypes.Encrypted && encryption != null) {
|
||||||
event = await encryption.decryptRoomEvent(roomId, event);
|
var decrypted = await encryption.decryptRoomEvent(roomId, event);
|
||||||
if (event.type == EventTypes.Encrypted && _currentSync != null) {
|
if (decrypted.messageType == MessageTypes.BadEncrypted &&
|
||||||
await _currentSync;
|
prevBatch != null) {
|
||||||
event = await encryption.decryptRoomEvent(roomId, event);
|
await oneShotSync();
|
||||||
|
decrypted = await encryption.decryptRoomEvent(roomId, event);
|
||||||
}
|
}
|
||||||
|
event = decrypted;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (storeInDatabase) {
|
if (storeInDatabase) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue