defaults, socket: sync full by default, prekey count set to 812

This commit is contained in:
Rajeh Taher
2025-10-15 19:16:25 +03:00
parent c84b20703c
commit d9c3b5aaf3
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ export const DEFAULT_CONNECTION_CONFIG: SocketConfig = {
fireInitQueries: true,
auth: undefined as unknown as AuthenticationState,
markOnlineOnConnect: true,
syncFullHistory: false,
syncFullHistory: true,
patchMessageBeforeSending: msg => msg,
shouldSyncHistoryMessage: () => true,
shouldIgnoreJid: () => false,
@@ -119,7 +119,7 @@ export const MEDIA_KEYS = Object.keys(MEDIA_PATH_MAP) as MediaType[]
export const MIN_PREKEY_COUNT = 5
export const INITIAL_PREKEY_COUNT = 30
export const INITIAL_PREKEY_COUNT = 812
export const UPLOAD_TIMEOUT = 30000 // 30 seconds
export const MIN_UPLOAD_INTERVAL = 5000 // 5 seconds minimum between uploads
+1 -1
View File
@@ -436,7 +436,7 @@ export const makeSocket = (config: SocketConfig) => {
// Prevent multiple concurrent uploads
if (uploadPreKeysPromise) {
logger.debug('Pre-key upload already in progress, waiting for completion')
return uploadPreKeysPromise
await uploadPreKeysPromise
}
const uploadLogic = async () => {
+1
View File
@@ -229,6 +229,7 @@ const processMessage = async (
)
if (process) {
// TODO: investigate
if (histNotification.syncType !== proto.HistorySync.HistorySyncType.ON_DEMAND) {
ev.emit('creds.update', {
processedHistoryMessages: [