Better check for empty storage/master keys
This commit is contained in:
parent
89e66da351
commit
59fa75c309
2 changed files with 6 additions and 4 deletions
|
@ -3301,8 +3301,10 @@ export default class MessageReceiver
|
|||
|
||||
const ev = new KeysEvent(
|
||||
{
|
||||
storageServiceKey: dropNull(sync.storageService),
|
||||
masterKey: dropNull(sync.master),
|
||||
storageServiceKey: Bytes.isNotEmpty(sync.storageService)
|
||||
? sync.storageService
|
||||
: undefined,
|
||||
masterKey: Bytes.isNotEmpty(sync.master) ? sync.master : undefined,
|
||||
},
|
||||
this.removeFromCache.bind(this, envelope)
|
||||
);
|
||||
|
|
|
@ -85,10 +85,10 @@ class ProvisioningCipherInner {
|
|||
userAgent: provisionMessage.userAgent,
|
||||
readReceipts: provisionMessage.readReceipts,
|
||||
};
|
||||
if (provisionMessage.profileKey) {
|
||||
if (Bytes.isNotEmpty(provisionMessage.profileKey)) {
|
||||
ret.profileKey = provisionMessage.profileKey;
|
||||
}
|
||||
if (provisionMessage.masterKey) {
|
||||
if (Bytes.isNotEmpty(provisionMessage.masterKey)) {
|
||||
ret.masterKey = provisionMessage.masterKey;
|
||||
}
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue