mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: add retry capability to SignalKeyStore
This commit is contained in:
@@ -72,6 +72,11 @@ export type SignalKeyStoreWithTransaction = SignalKeyStore & {
|
||||
prefetch<T extends keyof SignalDataTypeMap>(type: T, ids: string[]): Promise<void>
|
||||
}
|
||||
|
||||
export type TransactionCapabilityOptions = {
|
||||
maxCommitRetries: number
|
||||
delayBetweenTriesMs: number
|
||||
}
|
||||
|
||||
export type SignalAuthState = {
|
||||
creds: SignalCreds
|
||||
keys: SignalKeyStore
|
||||
|
||||
@@ -12,7 +12,7 @@ export * from './Call'
|
||||
|
||||
import type NodeCache from 'node-cache'
|
||||
import { proto } from '../../WAProto'
|
||||
import { AuthenticationState } from './Auth'
|
||||
import { AuthenticationState, TransactionCapabilityOptions } from './Auth'
|
||||
import { CommonSocketConfig } from './Socket'
|
||||
|
||||
export type MessageRetryMap = { [msgId: string]: number }
|
||||
@@ -20,6 +20,8 @@ export type MessageRetryMap = { [msgId: string]: number }
|
||||
export type SocketConfig = CommonSocketConfig<AuthenticationState> & {
|
||||
/** By default true, should history messages be downloaded and processed */
|
||||
downloadHistory: boolean
|
||||
/** transaction capability options for SignalKeyStore */
|
||||
transactionOpts: TransactionCapabilityOptions
|
||||
/** provide a cache to store a user's device list */
|
||||
userDevicesCache?: NodeCache
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user