Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7436beaab3 |
@@ -27,6 +27,7 @@ export type BaileysEventMap = {
|
||||
chats: Chat[]
|
||||
contacts: Contact[]
|
||||
messages: WAMessage[]
|
||||
pastParticipants?: proto.IPastParticipants[] | null
|
||||
isLatest?: boolean
|
||||
progress?: number | null
|
||||
syncType?: proto.HistorySync.HistorySyncType | null
|
||||
@@ -185,6 +186,7 @@ export type BufferedEventData = {
|
||||
chats: { [jid: string]: Chat }
|
||||
contacts: { [jid: string]: Contact }
|
||||
messages: { [uqId: string]: WAMessage }
|
||||
pastParticipants?: proto.IPastParticipants[]
|
||||
empty: boolean
|
||||
isLatest: boolean
|
||||
progress?: number | null
|
||||
|
||||
@@ -967,6 +967,10 @@ function append<E extends BufferableEvent>(
|
||||
}
|
||||
}
|
||||
|
||||
data.historySets.pastParticipants = [
|
||||
...(data.historySets.pastParticipants || []),
|
||||
...(eventData.pastParticipants || [])
|
||||
]
|
||||
data.historySets.empty = false
|
||||
data.historySets.syncType = eventData.syncType
|
||||
data.historySets.progress = eventData.progress
|
||||
@@ -1292,6 +1296,7 @@ function consolidateEvents(data: BufferedEventData) {
|
||||
chats: Object.values(data.historySets.chats),
|
||||
messages: Object.values(data.historySets.messages),
|
||||
contacts: Object.values(data.historySets.contacts),
|
||||
pastParticipants: data.historySets.pastParticipants,
|
||||
syncType: data.historySets.syncType,
|
||||
progress: data.historySets.progress,
|
||||
isLatest: data.historySets.isLatest,
|
||||
|
||||
@@ -378,6 +378,7 @@ export const processHistoryMessage = (item: proto.IHistorySync, logger?: ILogger
|
||||
chats,
|
||||
contacts,
|
||||
messages,
|
||||
pastParticipants: item.pastParticipants,
|
||||
lidPnMappings,
|
||||
syncType: item.syncType,
|
||||
progress: item.progress
|
||||
|
||||
Reference in New Issue
Block a user