mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: update proto
the proto was generated using a different method, hence the diff is larger -- but if the method continues to work, we should get very nice little diffs
This commit is contained in:
File diff suppressed because it is too large
Load Diff
20538
WAProto/index.d.ts
vendored
20538
WAProto/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
55706
WAProto/index.js
55706
WAProto/index.js
File diff suppressed because it is too large
Load Diff
@@ -105,7 +105,7 @@ export const makeNoiseHandler = (
|
|||||||
const certDecoded = decrypt(serverHello!.payload!)
|
const certDecoded = decrypt(serverHello!.payload!)
|
||||||
const { intermediate: certIntermediate } = proto.CertChain.decode(certDecoded)
|
const { intermediate: certIntermediate } = proto.CertChain.decode(certDecoded)
|
||||||
|
|
||||||
const { issuerSerial } = proto.Details.decode(certIntermediate!.details!)
|
const { issuerSerial } = proto.CertChainNoiseCertificateDetails.decode(certIntermediate!.details!)
|
||||||
|
|
||||||
if(issuerSerial !== WA_CERT_DETAILS.SERIAL) {
|
if(issuerSerial !== WA_CERT_DETAILS.SERIAL) {
|
||||||
throw new Boom('certification match failed', { statusCode: 400 })
|
throw new Boom('certification match failed', { statusCode: 400 })
|
||||||
|
|||||||
@@ -66,25 +66,26 @@ export const generateRegistrationNode = (
|
|||||||
.digest()
|
.digest()
|
||||||
const browserVersion = config.browser[2].split('.')
|
const browserVersion = config.browser[2].split('.')
|
||||||
|
|
||||||
const companion: proto.ICompanionProps = {
|
const companion: proto.IDeviceProps = {
|
||||||
os: config.browser[0],
|
os: config.browser[0],
|
||||||
version: {
|
version: {
|
||||||
primary: +(browserVersion[0] || 0),
|
primary: +(browserVersion[0] || 0),
|
||||||
secondary: +(browserVersion[1] || 1),
|
secondary: +(browserVersion[1] || 1),
|
||||||
tertiary: +(browserVersion[2] || 0),
|
tertiary: +(browserVersion[2] || 0),
|
||||||
},
|
},
|
||||||
platformType: proto.CompanionProps.CompanionPropsPlatformType[config.browser[1].toUpperCase()] || proto.CompanionProps.CompanionPropsPlatformType.UNKNOWN,
|
platformType: proto.DeviceProps.DevicePropsPlatformType[config.browser[1].toUpperCase()]
|
||||||
|
|| proto.DeviceProps.DevicePropsPlatformType.UNKNOWN,
|
||||||
requireFullSync: false,
|
requireFullSync: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
const companionProto = proto.CompanionProps.encode(companion).finish()
|
const companionProto = proto.DeviceProps.encode(companion).finish()
|
||||||
|
|
||||||
const registerPayload: proto.IClientPayload = {
|
const registerPayload: proto.IClientPayload = {
|
||||||
...getClientPayload(config),
|
...getClientPayload(config),
|
||||||
passive: false,
|
passive: false,
|
||||||
regData: {
|
devicePairingData: {
|
||||||
buildHash: appVersionBuf,
|
buildHash: appVersionBuf,
|
||||||
companionProps: companionProto,
|
deviceProps: companionProto,
|
||||||
eRegid: encodeBigEndian(registrationId),
|
eRegid: encodeBigEndian(registrationId),
|
||||||
eKeytype: KEY_BUNDLE_TYPE,
|
eKeytype: KEY_BUNDLE_TYPE,
|
||||||
eIdent: signedIdentityKey.public,
|
eIdent: signedIdentityKey.public,
|
||||||
|
|||||||
Reference in New Issue
Block a user