defaults,utils: Minimize vectors for automation detection

This commit is contained in:
Rajeh Taher
2025-10-07 20:28:58 +03:00
parent acc5111792
commit 54db127303
4 changed files with 29 additions and 7 deletions
-1
View File
@@ -6,7 +6,6 @@ import { proto } from '../../WAProto/index.js'
import { DEFAULT_CACHE_TTLS, KEY_BUNDLE_TYPE, MIN_PREKEY_COUNT } from '../Defaults'
import type {
GroupParticipant,
LIDMapping,
MessageReceiptType,
MessageRelayOptions,
MessageUserReceipt,
+4
View File
@@ -45,6 +45,7 @@ import {
jidEncode,
S_WHATSAPP_NET
} from '../WABinary'
import { BinaryInfo } from '../WAM/BinaryInfo.js'
import { USyncQuery, USyncUser } from '../WAUSync/'
import { WebSocketClient } from './Client'
@@ -70,6 +71,8 @@ export const makeSocket = (config: SocketConfig) => {
makeSignalRepository
} = config
const publicWAMBuffer = new BinaryInfo()
const uqTagId = generateMdTagPrefix()
const generateMessageTag = () => `${uqTagId}${epoch++}`
@@ -1000,6 +1003,7 @@ export const makeSocket = (config: SocketConfig) => {
uploadPreKeys,
uploadPreKeysToServerIfRequired,
requestPairingCode,
wamBuffer: publicWAMBuffer,
/** Waits for the connection to WA to reach a state */
waitForConnectionUpdate: bindWaitForConnectionUpdate(ev),
sendWAMBuffer,