mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: correctly sync app state
This commit is contained in:
@@ -725,7 +725,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
)
|
)
|
||||||
: false
|
: false
|
||||||
|
|
||||||
if(shouldProcessHistoryMsg && !authState.creds.myAppStateKeyId) {
|
if(historyMsg && !authState.creds.myAppStateKeyId) {
|
||||||
logger.warn('skipping app state sync, as myAppStateKeyId is not set')
|
logger.warn('skipping app state sync, as myAppStateKeyId is not set')
|
||||||
pendingAppStateSync = true
|
pendingAppStateSync = true
|
||||||
}
|
}
|
||||||
@@ -733,7 +733,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
await Promise.all([
|
await Promise.all([
|
||||||
(async() => {
|
(async() => {
|
||||||
if(
|
if(
|
||||||
shouldProcessHistoryMsg
|
historyMsg
|
||||||
&& authState.creds.myAppStateKeyId
|
&& authState.creds.myAppStateKeyId
|
||||||
) {
|
) {
|
||||||
pendingAppStateSync = false
|
pendingAppStateSync = false
|
||||||
|
|||||||
Reference in New Issue
Block a user