Deprecate Keys.storageService sync field
This commit is contained in:
parent
6c8f47a029
commit
0a2b7db4df
4 changed files with 5 additions and 26 deletions
|
@ -3363,15 +3363,8 @@ export default class MessageReceiver
|
|||
|
||||
logUnexpectedUrgentValue(envelope, 'keySync');
|
||||
|
||||
if (!sync.storageService && !sync.master) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const ev = new KeysEvent(
|
||||
{
|
||||
storageServiceKey: Bytes.isNotEmpty(sync.storageService)
|
||||
? sync.storageService
|
||||
: undefined,
|
||||
masterKey: Bytes.isNotEmpty(sync.master) ? sync.master : undefined,
|
||||
accountEntropyPool: sync.accountEntropyPool || undefined,
|
||||
mediaRootBackupKey: Bytes.isNotEmpty(sync.mediaRootBackupKey)
|
||||
|
|
|
@ -389,30 +389,22 @@ export class FetchLatestEvent extends ConfirmableEvent {
|
|||
}
|
||||
|
||||
export type KeysEventData = Readonly<{
|
||||
storageServiceKey: Uint8Array | undefined;
|
||||
masterKey: Uint8Array | undefined;
|
||||
accountEntropyPool: string | undefined;
|
||||
mediaRootBackupKey: Uint8Array | undefined;
|
||||
}>;
|
||||
|
||||
export class KeysEvent extends ConfirmableEvent {
|
||||
public readonly storageServiceKey: Uint8Array | undefined;
|
||||
public readonly masterKey: Uint8Array | undefined;
|
||||
public readonly accountEntropyPool: string | undefined;
|
||||
public readonly mediaRootBackupKey: Uint8Array | undefined;
|
||||
|
||||
constructor(
|
||||
{
|
||||
storageServiceKey,
|
||||
masterKey,
|
||||
accountEntropyPool,
|
||||
mediaRootBackupKey,
|
||||
}: KeysEventData,
|
||||
{ masterKey, accountEntropyPool, mediaRootBackupKey }: KeysEventData,
|
||||
confirm: ConfirmCallback
|
||||
) {
|
||||
super('keys', confirm);
|
||||
|
||||
this.storageServiceKey = storageServiceKey;
|
||||
this.masterKey = masterKey;
|
||||
this.accountEntropyPool = accountEntropyPool;
|
||||
this.mediaRootBackupKey = mediaRootBackupKey;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue