Fix format of pniSignature.pniBytes
This commit is contained in:
@@ -128,9 +128,7 @@ describe('pnp/PNI Signature', function needsName() {
|
||||
}
|
||||
|
||||
assert.deepEqual(
|
||||
Pni.parseFromServiceIdBinary(
|
||||
Buffer.from(message.pni)
|
||||
).getServiceIdString(),
|
||||
Pni.fromUuidBytes(Buffer.from(message.pni)).getServiceIdString(),
|
||||
desktop.pni,
|
||||
`Incorrect pni in pni signature message from ${source}`
|
||||
);
|
||||
|
@@ -2754,9 +2754,7 @@ export default class MessageReceiver
|
||||
|
||||
const { pni: pniBytes, signature } = pniSignatureMessage;
|
||||
strictAssert(Bytes.isNotEmpty(pniBytes), `${logId}: missing PNI bytes`);
|
||||
const pni = fromPniObject(
|
||||
Pni.parseFromServiceIdBinary(Buffer.from(pniBytes))
|
||||
);
|
||||
const pni = fromPniObject(Pni.fromUuidBytes(Buffer.from(pniBytes)));
|
||||
strictAssert(pni, `${logId}: missing PNI`);
|
||||
strictAssert(Bytes.isNotEmpty(signature), `${logId}: empty signature`);
|
||||
strictAssert(isAciString(aci), `${logId}: invalid ACI`);
|
||||
|
@@ -598,7 +598,7 @@ function addPniSignatureMessageToProto({
|
||||
proto.pniSignatureMessage = {
|
||||
pni: Pni.parseFromServiceIdString(
|
||||
pniSignatureMessage.pni
|
||||
).getServiceIdBinary(),
|
||||
).getRawUuidBytes(),
|
||||
signature: pniSignatureMessage.signature,
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user