mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
browser authInfo load fix
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -10,4 +10,5 @@ browser-messages.json
|
||||
decoded-ws.json
|
||||
auth_info2.json
|
||||
lib
|
||||
doc
|
||||
docs
|
||||
browser-token.json
|
||||
|
||||
@@ -122,7 +122,7 @@ export class WAConnection extends EventEmitter {
|
||||
macKey: Buffer.isBuffer(authInfo.macKey) ? authInfo.macKey : Buffer.from(authInfo.macKey, 'base64'),
|
||||
}
|
||||
} else {
|
||||
const secretBundle: {encKey: string, macKey: string} = typeof authInfo === 'string' ? JSON.parse (authInfo): authInfo
|
||||
const secretBundle: {encKey: string, macKey: string} = typeof authInfo.WASecretBundle === 'string' ? JSON.parse (authInfo.WASecretBundle): authInfo.WASecretBundle
|
||||
this.authInfo = {
|
||||
clientID: authInfo.WABrowserId.replace(/\"/g, ''),
|
||||
serverToken: authInfo.WAToken2.replace(/\"/g, ''),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"inputFiles": ["./src"],
|
||||
"inputFiles": ["./src/Binary", "./src/WAConnection", "./WAMessage"],
|
||||
"mode": "modules",
|
||||
"out": "docs"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user