Merge branch 'krille/wait-for-devicekeys' into 'main'

chore: Make sure account data and device keys is loaded when using isCached

See merge request famedly/company/frontend/famedlysdk!1037
This commit is contained in:
Nicolas Werner 2022-05-12 12:04:28 +00:00
commit 4fec950dda
1 changed files with 2 additions and 0 deletions

View File

@ -558,6 +558,8 @@ class KeyManager {
if (!enabled) {
return false;
}
await client.accountDataLoading;
await client.userDeviceKeysLoading;
return (await encryption.ssss.getCached(megolmKey)) != null;
}