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;
|
||||
if (event.type == EventTypes.Encrypted && encryption != null) {
|
||||
event = await encryption.decryptRoomEvent(roomId, event);
|
||||
if (event.type == EventTypes.Encrypted && _currentSync != null) {
|
||||
await _currentSync;
|
||||
event = await encryption.decryptRoomEvent(roomId, event);
|
||||
var decrypted = await encryption.decryptRoomEvent(roomId, event);
|
||||
if (decrypted.messageType == MessageTypes.BadEncrypted &&
|
||||
prevBatch != null) {
|
||||
await oneShotSync();
|
||||
decrypted = await encryption.decryptRoomEvent(roomId, event);
|
||||
}
|
||||
event = decrypted;
|
||||
}
|
||||
|
||||
if (storeInDatabase) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue