*group: parse @lids properly when processing group notifications

*This commit is breaking, it changes the format of participants in group-participants.update.
This commit is contained in:
Rajeh Taher
2025-10-05 23:56:14 +03:00
parent 09263aa3d2
commit c5b0001b61
8 changed files with 95 additions and 27 deletions
+16 -2
View File
@@ -4,7 +4,13 @@ import type { AuthenticationCreds } from './Auth'
import type { WACallEvent } from './Call'
import type { Chat, ChatUpdate, PresenceData } from './Chat'
import type { Contact } from './Contact'
import type { GroupMetadata, ParticipantAction, RequestJoinAction, RequestJoinMethod } from './GroupMetadata'
import type {
GroupMetadata,
GroupParticipant,
ParticipantAction,
RequestJoinAction,
RequestJoinMethod
} from './GroupMetadata'
import type { Label } from './Label'
import type { LabelAssociation } from './LabelAssociation'
import type { MessageUpsertType, MessageUserReceiptUpdate, WAMessage, WAMessageKey, WAMessageUpdate } from './Message'
@@ -56,11 +62,19 @@ export type BaileysEventMap = {
'groups.upsert': GroupMetadata[]
'groups.update': Partial<GroupMetadata>[]
/** apply an action to participants in a group */
'group-participants.update': { id: string; author: string; participants: string[]; action: ParticipantAction }
'group-participants.update': {
id: string
author: string
authorPn?: string
participants: GroupParticipant[]
action: ParticipantAction
}
'group.join-request': {
id: string
author: string
authorPn?: string
participant: string
participantPn?: string
action: RequestJoinAction
method: RequestJoinMethod
}