Fix format of pniSignature.pniBytes

This commit is contained in:
Fedor Indutny
2023-09-14 22:39:51 +02:00
committed by GitHub
parent d0296ececa
commit 654215e136
5 changed files with 8 additions and 12 deletions

View File

@@ -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`);