mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: more logging
This commit is contained in:
@@ -35,12 +35,14 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
const appStateSyncTimeout = debouncedTimeout(
|
const appStateSyncTimeout = debouncedTimeout(
|
||||||
APP_STATE_SYNC_TIMEOUT_MS,
|
APP_STATE_SYNC_TIMEOUT_MS,
|
||||||
async() => {
|
async() => {
|
||||||
logger.info(
|
|
||||||
{ recvChats: Object.keys(recvChats).length },
|
|
||||||
'doing initial app state sync'
|
|
||||||
)
|
|
||||||
if(ws.readyState === ws.OPEN) {
|
if(ws.readyState === ws.OPEN) {
|
||||||
|
logger.info(
|
||||||
|
{ recvChats: Object.keys(recvChats).length },
|
||||||
|
'doing initial app state sync'
|
||||||
|
)
|
||||||
await resyncMainAppState(recvChats)
|
await resyncMainAppState(recvChats)
|
||||||
|
} else {
|
||||||
|
logger.warn('connection closed before app state sync')
|
||||||
}
|
}
|
||||||
|
|
||||||
historyCache.clear()
|
historyCache.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user