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
|
node_modules
|
||||||
auth_info.json
|
auth_info.json
|
||||||
output.csv
|
output.csv
|
||||||
package-lock.json
|
|
||||||
*/.DS_Store
|
*/.DS_Store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.env
|
.env
|
||||||
auth_info_browser.json
|
auth_info_browser.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
browser-messages.json
|
browser-messages.json
|
||||||
package-lock.json
|
|
||||||
package-lock.json
|
|
||||||
decoded-ws.json
|
decoded-ws.json
|
||||||
auth_info2.json
|
auth_info2.json
|
||||||
lib
|
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": {
|
"dependencies": {
|
||||||
"@adiwajshing/keyed-db": "^0.1.2",
|
"@adiwajshing/keyed-db": "^0.1.2",
|
||||||
"curve25519-js": "0.0.4",
|
"curve25519-js": "^0.0.4",
|
||||||
"futoin-hkdf": "1.3.2",
|
"futoin-hkdf": "^1.3.2",
|
||||||
"jimp": "0.14.0",
|
"jimp": "^0.14.0",
|
||||||
"node-fetch": "^2.6.0",
|
"node-fetch": "^2.6.0",
|
||||||
"protobufjs": "6.10.1",
|
"protobufjs": "^6.10.1",
|
||||||
"qrcode-terminal": "^0.12.0",
|
"qrcode-terminal": "^0.12.0",
|
||||||
"ws": "^7.3.1"
|
"ws": "^7.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/mocha": "7.0.2",
|
"@types/mocha": "^7.0.2",
|
||||||
"@types/node": "^14.0.27",
|
"@types/node": "^14.6.0",
|
||||||
"@types/ws": "^7.2.6",
|
"@types/ws": "^7.2.6",
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"mocha": "^8.1.1",
|
"mocha": "^8.1.1",
|
||||||
"ts-node-dev": "^1.0.0-pre.57",
|
"ts-node-dev": "^1.0.0-pre.60",
|
||||||
"typedoc": "0.18.0",
|
"typedoc": "^0.18.0",
|
||||||
"typescript": "3.9.7"
|
"typescript": "^3.9.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,10 +272,11 @@ export class WAConnection extends EventEmitter {
|
|||||||
* @see close() if you just want to close the connection
|
* @see close() if you just want to close the connection
|
||||||
*/
|
*/
|
||||||
async logout () {
|
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
|
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()
|
this.close()
|
||||||
}
|
}
|
||||||
/** Close the connection to WhatsApp Web */
|
/** Close the connection to WhatsApp Web */
|
||||||
|
|||||||
Reference in New Issue
Block a user