Compare commits

...

5 Commits

Author SHA1 Message Date
Renato Alcara 7436beaab3 feat: add pastParticipants support in history sync
Surfaces past group participant data from WhatsApp history sync messages.
Previously pastParticipants was dropped during event buffering because
it was overwritten instead of accumulated across chunks.

- src/Types/Events.ts: add pastParticipants to BaileysEventMap['messaging-history.set'] and BufferedEventData.historySets
- src/Utils/event-buffer.ts: accumulate pastParticipants via spread array instead of overwriting; include in consolidateEvents output
- src/Utils/history.ts: pass item.pastParticipants in processHistoryMessage return

Refs: WhiskeySockets/Baileys#2426

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 12:25:51 -03:00
Renato Alcara 5926da9493 Merge branch 'master' of https://github.com/rsalcara/InfiniteAPI 2026-03-19 12:22:07 -03:00
Renato Alcara 2b2c3f9155 Merge branch 'master' of https://github.com/rsalcara/InfiniteAPI 2026-03-19 11:24:01 -03:00
Renato Alcara 6060293793 fix: jimp detection for thumbnail generation
Fix typeof check: Jimp constructor is 'function' not 'object' in
jimp v1.6+. Without this fix, jpegThumbnail is never generated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 00:41:54 -03:00
Renato Alcara afce764ce9 Revert "fix: carousel renders on WhatsApp Web without F5"
This reverts commit f2c14f9ad6.
2026-03-07 00:41:38 -03:00
3 changed files with 8 additions and 0 deletions
+2
View File
@@ -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
+5
View File
@@ -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,
+1
View File
@@ -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