mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
update
This commit is contained in:
@@ -251,7 +251,7 @@ export default class WAConnectionBase {
|
|||||||
* @return the message tag
|
* @return the message tag
|
||||||
*/
|
*/
|
||||||
protected async sendBinary(json: WANode, tags: WATag, tag?: string) {
|
protected async sendBinary(json: WANode, tags: WATag, tag?: string) {
|
||||||
if (!this.conn) await this.waitForConnection ()
|
if (!this.conn || this.conn.readyState !== this.conn.OPEN) await this.waitForConnection ()
|
||||||
|
|
||||||
const binary = this.encoder.write(json) // encode the JSON to the WhatsApp binary format
|
const binary = this.encoder.write(json) // encode the JSON to the WhatsApp binary format
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ export default class WAConnectionBase {
|
|||||||
}
|
}
|
||||||
/** Send some message to the WhatsApp servers */
|
/** Send some message to the WhatsApp servers */
|
||||||
protected async send(m) {
|
protected async send(m) {
|
||||||
if (!this.conn) await this.waitForConnection ()
|
if (!this.conn || this.conn.readyState !== this.conn.OPEN) await this.waitForConnection ()
|
||||||
|
|
||||||
this.msgCount += 1 // increment message count, it makes the 'epoch' field when sending binary messages
|
this.msgCount += 1 // increment message count, it makes the 'epoch' field when sending binary messages
|
||||||
return this.conn.send(m)
|
return this.conn.send(m)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"inputFiles": ["./src"],
|
"inputFiles": ["./src"],
|
||||||
"mode": "modules",
|
"mode": "modules",
|
||||||
"out": "doc"
|
"out": "docs"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user