mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: include correct browser version in connect
This commit is contained in:
@@ -48,13 +48,14 @@ export const generateRegistrationNode = (
|
|||||||
const appVersionBuf = createHash('md5')
|
const appVersionBuf = createHash('md5')
|
||||||
.update(config.version.join('.')) // join as string
|
.update(config.version.join('.')) // join as string
|
||||||
.digest()
|
.digest()
|
||||||
|
const browserVersion = config.browser[2].split('.')
|
||||||
|
|
||||||
const companion: proto.ICompanionProps = {
|
const companion: proto.ICompanionProps = {
|
||||||
os: config.browser[0],
|
os: config.browser[0],
|
||||||
version: {
|
version: {
|
||||||
primary: 10,
|
primary: +(browserVersion[0] || 10),
|
||||||
secondary: undefined,
|
secondary: +(browserVersion[1] || 0),
|
||||||
tertiary: undefined,
|
tertiary: +(browserVersion[2] || 0),
|
||||||
},
|
},
|
||||||
platformType: proto.CompanionProps.CompanionPropsPlatformType.CHROME,
|
platformType: proto.CompanionProps.CompanionPropsPlatformType.CHROME,
|
||||||
requireFullSync: false,
|
requireFullSync: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user