mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Move msgCount increment to generateMessageTag
Prevents duplicate tags from being sent
This commit is contained in:
@@ -15,7 +15,7 @@ import * as fs from 'fs'
|
||||
async function example() {
|
||||
const conn = new WAConnection() // instantiate
|
||||
conn.autoReconnect = ReconnectMode.onConnectionLost // only automatically reconnect when the connection breaks
|
||||
conn.logger.level = 'trace' // set to 'debug' to see what kind of stuff you can implement
|
||||
conn.logger.level = 'debug' // set to 'debug' to see what kind of stuff you can implement
|
||||
// attempt to reconnect at most 10 times in a row
|
||||
conn.connectOptions.maxRetries = 10
|
||||
conn.chatOrderingKey = waChatKey(true) // order chats such that pinned chats are on top
|
||||
@@ -38,7 +38,6 @@ async function example() {
|
||||
fs.writeFileSync('./auth_info.json', JSON.stringify(authInfo, null, '\t')) // save this info to a file
|
||||
|
||||
console.log('oh hello ' + conn.user.name + ' (' + conn.user.jid + ')')
|
||||
|
||||
// uncomment to load all unread messages
|
||||
//const unread = await conn.loadAllUnreadMessages ()
|
||||
//console.log ('you have ' + unread.length + ' unread messages')
|
||||
|
||||
Reference in New Issue
Block a user