diff --git a/src/Types/Events.ts b/src/Types/Events.ts index 289f5be..6a5dfb2 100644 --- a/src/Types/Events.ts +++ b/src/Types/Events.ts @@ -51,7 +51,7 @@ export type BaileysEventMap = { 'groups.upsert': GroupMetadata[] 'groups.update': Partial[] /** apply an action to participants in a group */ - 'group-participants.update': { id: string, participants: string[], action: ParticipantAction } + 'group-participants.update': { id: string, author: string, participants: string[], action: ParticipantAction } 'blocklist.set': { blocklist: string[] } 'blocklist.update': { blocklist: string[], type: 'add' | 'remove' } diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index 9f65d26..b666fbf 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -295,7 +295,7 @@ const processMessage = async( //let actor = whatsappID (message.participant) let participants: string[] const emitParticipantsUpdate = (action: ParticipantAction) => ( - ev.emit('group-participants.update', { id: jid, participants, action }) + ev.emit('group-participants.update', { id: jid, author: message.participant!, participants, action }) ) const emitGroupUpdate = (update: Partial) => { ev.emit('groups.update', [{ id: jid, ...update }])