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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
homeserver: [synapse, dendrite, conduit]
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|
@ -36,8 +38,8 @@ jobs:
|
||||||
scripts/prepare.sh
|
scripts/prepare.sh
|
||||||
scripts/test_driver.sh"
|
scripts/test_driver.sh"
|
||||||
|
|
||||||
# coverage is done on the flutter-linux image because we setup olm there
|
# 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_without_olm is done on dart images because why not :D
|
||||||
coverage:
|
coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
|
|
|
||||||
|
|
@ -581,6 +581,15 @@ class Bootstrap {
|
||||||
);
|
);
|
||||||
Logs().v('Store the secret...');
|
Logs().v('Store the secret...');
|
||||||
await newSsssKey?.store(megolmKey, base64.encode(privKey));
|
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(
|
Logs().v(
|
||||||
'And finally set all megolm keys as needing to be uploaded again...');
|
'And finally set all megolm keys as needing to be uploaded again...');
|
||||||
await client.database?.markInboundGroupSessionsAsNeedingUpload();
|
await client.database?.markInboundGroupSessionsAsNeedingUpload();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue