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 { 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) {
|
||||
throw new Boom('certification match failed', { statusCode: 400 })
|
||||
|
||||
@@ -66,25 +66,26 @@ export const generateRegistrationNode = (
|
||||
.digest()
|
||||
const browserVersion = config.browser[2].split('.')
|
||||
|
||||
const companion: proto.ICompanionProps = {
|
||||
const companion: proto.IDeviceProps = {
|
||||
os: config.browser[0],
|
||||
version: {
|
||||
primary: +(browserVersion[0] || 0),
|
||||
secondary: +(browserVersion[1] || 1),
|
||||
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,
|
||||
}
|
||||
|
||||
const companionProto = proto.CompanionProps.encode(companion).finish()
|
||||
const companionProto = proto.DeviceProps.encode(companion).finish()
|
||||
|
||||
const registerPayload: proto.IClientPayload = {
|
||||
...getClientPayload(config),
|
||||
passive: false,
|
||||
regData: {
|
||||
devicePairingData: {
|
||||
buildHash: appVersionBuf,
|
||||
companionProps: companionProto,
|
||||
deviceProps: companionProto,
|
||||
eRegid: encodeBigEndian(registrationId),
|
||||
eKeytype: KEY_BUNDLE_TYPE,
|
||||
eIdent: signedIdentityKey.public,
|
||||
|
||||
Reference in New Issue
Block a user