Fix format of pniSignature.pniBytes
This commit is contained in:
parent
d0296ececa
commit
654215e136
5 changed files with 8 additions and 12 deletions
|
@ -195,7 +195,7 @@
|
|||
"@electron/fuses": "1.5.0",
|
||||
"@formatjs/intl": "2.6.7",
|
||||
"@mixer/parallel-prettier": "2.0.3",
|
||||
"@signalapp/mock-server": "4.1.0",
|
||||
"@signalapp/mock-server": "4.1.1",
|
||||
"@storybook/addon-a11y": "6.5.6",
|
||||
"@storybook/addon-actions": "6.5.6",
|
||||
"@storybook/addon-controls": "6.5.6",
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3379,10 +3379,10 @@
|
|||
node-gyp-build "^4.2.3"
|
||||
uuid "^8.3.0"
|
||||
|
||||
"@signalapp/mock-server@4.1.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/mock-server/-/mock-server-4.1.0.tgz#2a96981a3e375df0cbab37476fa448b99df3d143"
|
||||
integrity sha512-sVcw384ZjkymsQ4f8GSgUTaF3IIhaMBIYqW76Trzf0U46Uw8gD3hhGjBSBb5GAJQWgJKcAusirXhx/D5mF8z3Q==
|
||||
"@signalapp/mock-server@4.1.1":
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@signalapp/mock-server/-/mock-server-4.1.1.tgz#563a31a30cbefcb6c443a8fe7c77d9f20d3920db"
|
||||
integrity sha512-u+8BJK3Nl1Daw/I1J5ki4LtB99NvwSCUassEcTllWQppSg0wU0nxOwlDedMseyUvIhtUIePu2/nmysT1E3jRiw==
|
||||
dependencies:
|
||||
"@signalapp/libsignal-client" "^0.30.2"
|
||||
debug "^4.3.2"
|
||||
|
|
Loading…
Reference in a new issue