mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
refactor: use event-buffer for state sync resyncs
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import type { proto } from '../../WAProto'
|
||||
import type { AccountSettings, AuthenticationCreds } from './Auth'
|
||||
import { Contact } from './Contact'
|
||||
import type { MinimalMessage, WAMessageUpdate } from './Message'
|
||||
import type { AccountSettings } from './Auth'
|
||||
import type { MinimalMessage } from './Message'
|
||||
|
||||
/** set of statuses visible to other people; see updatePresence() in WhatsAppWeb.Send */
|
||||
export type WAPresence = 'unavailable' | 'available' | 'composing' | 'recording' | 'paused'
|
||||
@@ -26,20 +25,6 @@ export type ChatMutation = {
|
||||
index: string[]
|
||||
}
|
||||
|
||||
export type SyncActionUpdates = {
|
||||
credsUpdates: Partial<AuthenticationCreds>
|
||||
chatUpdates: { [jid: string]: Partial<Chat> }
|
||||
chatDeletes: string[]
|
||||
contactUpserts: { [jid: string]: Contact }
|
||||
msgUpdates: { [jid: string]: WAMessageUpdate }
|
||||
msgDeletes: proto.IMessageKey[]
|
||||
}
|
||||
|
||||
export type AppStateChunk = {
|
||||
updates: SyncActionUpdates
|
||||
collectionsToHandle: WAPatchName[]
|
||||
}
|
||||
|
||||
export type WAPatchCreate = {
|
||||
syncAction: proto.ISyncActionValue
|
||||
index: string[]
|
||||
|
||||
Reference in New Issue
Block a user