mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
committed package-lock.json + logout changes
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,15 +1,12 @@
|
||||
node_modules
|
||||
auth_info.json
|
||||
output.csv
|
||||
package-lock.json
|
||||
*/.DS_Store
|
||||
.DS_Store
|
||||
.env
|
||||
auth_info_browser.json
|
||||
yarn.lock
|
||||
browser-messages.json
|
||||
package-lock.json
|
||||
package-lock.json
|
||||
decoded-ws.json
|
||||
auth_info2.json
|
||||
lib
|
||||
|
||||
2643
package-lock.json
generated
Normal file
2643
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@@ -31,23 +31,23 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@adiwajshing/keyed-db": "^0.1.2",
|
||||
"curve25519-js": "0.0.4",
|
||||
"futoin-hkdf": "1.3.2",
|
||||
"jimp": "0.14.0",
|
||||
"curve25519-js": "^0.0.4",
|
||||
"futoin-hkdf": "^1.3.2",
|
||||
"jimp": "^0.14.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"protobufjs": "6.10.1",
|
||||
"protobufjs": "^6.10.1",
|
||||
"qrcode-terminal": "^0.12.0",
|
||||
"ws": "^7.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "7.0.2",
|
||||
"@types/node": "^14.0.27",
|
||||
"@types/mocha": "^7.0.2",
|
||||
"@types/node": "^14.6.0",
|
||||
"@types/ws": "^7.2.6",
|
||||
"assert": "^2.0.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"mocha": "^8.1.1",
|
||||
"ts-node-dev": "^1.0.0-pre.57",
|
||||
"typedoc": "0.18.0",
|
||||
"typescript": "3.9.7"
|
||||
"ts-node-dev": "^1.0.0-pre.60",
|
||||
"typedoc": "^0.18.0",
|
||||
"typescript": "^3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,10 +272,11 @@ export class WAConnection extends EventEmitter {
|
||||
* @see close() if you just want to close the connection
|
||||
*/
|
||||
async logout () {
|
||||
if (this.state !== 'open') throw new Error("You're not even connected, you can't log out")
|
||||
|
||||
await new Promise(resolve => this.conn.send('goodbye,["admin","Conn","disconnect"]', null, resolve))
|
||||
this.authInfo = null
|
||||
if (this.state === 'open') {
|
||||
//throw new Error("You're not even connected, you can't log out")
|
||||
await new Promise(resolve => this.conn.send('goodbye,["admin","Conn","disconnect"]', null, resolve))
|
||||
}
|
||||
this.close()
|
||||
}
|
||||
/** Close the connection to WhatsApp Web */
|
||||
|
||||
Reference in New Issue
Block a user