Merge pull request #1562 from famedly/nico/fix-okb-bootstrap
fix: wait for online key backup key to be cached on reset
This commit is contained in:
commit
02d7569c90
|
|
@ -18,6 +18,8 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
homeserver: [synapse, dendrite, conduit]
|
||||
# since the dendrite job is optional, actually run all tests to the end instead of failing on first error.
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run tests
|
||||
|
|
@ -36,8 +38,8 @@ jobs:
|
|||
scripts/prepare.sh
|
||||
scripts/test_driver.sh"
|
||||
|
||||
# coverage is done on the flutter-linux image because we setup olm there
|
||||
# coverage_without_olm is done on dart images because why not :D
|
||||
# coverage is done on the flutter-linux image because we setup olm there
|
||||
# coverage_without_olm is done on dart images because why not :D
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
|
|
|
|||
|
|
@ -581,6 +581,15 @@ class Bootstrap {
|
|||
);
|
||||
Logs().v('Store the secret...');
|
||||
await newSsssKey?.store(megolmKey, base64.encode(privKey));
|
||||
Logs().v('Wait for secret to come down sync');
|
||||
|
||||
if (!await encryption.keyManager.isCached()) {
|
||||
await client.onSync.stream.firstWhere((syncUpdate) =>
|
||||
syncUpdate.accountData != null &&
|
||||
syncUpdate.accountData!
|
||||
.any((accountData) => accountData.type == megolmKey));
|
||||
}
|
||||
|
||||
Logs().v(
|
||||
'And finally set all megolm keys as needing to be uploaded again...');
|
||||
await client.database?.markInboundGroupSessionsAsNeedingUpload();
|
||||
|
|
|
|||
Loading…
Reference in New Issue