From 1ef04d5329efd5dc6c8f96eef8689563a2962e6a Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Thu, 22 Jan 2026 14:43:19 +0200 Subject: [PATCH] socket: no sync warning!!!!! --- src/Socket/socket.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Socket/socket.ts b/src/Socket/socket.ts index 8aeb02ab..b258fc40 100644 --- a/src/Socket/socket.ts +++ b/src/Socket/socket.ts @@ -10,6 +10,7 @@ import { MIN_PREKEY_COUNT, MIN_UPLOAD_INTERVAL, NOISE_WA_HEADER, + PROCESSABLE_HISTORY_TYPES, UPLOAD_TIMEOUT } from '../Defaults' import type { LIDMapping, SocketConfig } from '../Types' @@ -80,11 +81,21 @@ export const makeSocket = (config: SocketConfig) => { const generateMessageTag = () => `${uqTagId}${epoch++}` if (printQRInTerminal) { - console.warn( + logger.warn( + {}, '⚠️ The printQRInTerminal option has been deprecated. You will no longer receive QR codes in the terminal automatically. Please listen to the connection.update event yourself and handle the QR your way. You can remove this message by removing this opttion. This message will be removed in a future version.' ) } + const syncDisabled = + PROCESSABLE_HISTORY_TYPES.map(syncType => config.shouldSyncHistoryMessage({ syncType })).filter(x => x === false) + .length === PROCESSABLE_HISTORY_TYPES.length + if (syncDisabled) { + logger.warn( + '⚠️ DANGER: DISABLING ALL SYNC BY shouldSyncHistoryMsg PREVENTS BAILEYS FROM ACCESSING INITIAL LID MAPPINGS, LEADING TO INSTABILIY AND SESSION ERRORS' + ) + } + const url = typeof waWebSocketUrl === 'string' ? new URL(waWebSocketUrl) : waWebSocketUrl if (config.mobile || url.protocol === 'tcp:') {