Run storage service on link

This commit is contained in:
Fedor Indutny 2024-02-28 17:48:11 -08:00 committed by GitHub
parent 3050a314f9
commit 08eb4fc168
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View file

@ -32,6 +32,7 @@ import {
getRandomBytes,
decryptDeviceName,
encryptDeviceName,
deriveStorageServiceKey,
} from '../Crypto';
import {
generateKeyPair,
@ -1237,6 +1238,10 @@ export default class AccountManager extends EventTarget {
}
if (masterKey) {
await storage.put('masterKey', Bytes.toBase64(masterKey));
await storage.put(
'storageKey',
Bytes.toBase64(deriveStorageServiceKey(masterKey))
);
}
await storage.put('read-receipt-setting', Boolean(readReceipts));