From a1082e85eda4b5bb9f2bdff0a8eb540aafc7a1c8 Mon Sep 17 00:00:00 2001 From: Aditya Singh <72691999+as1605@users.noreply.github.com> Date: Wed, 22 Jun 2022 10:44:59 +0530 Subject: [PATCH] Fixed groupParticipantsUpdate request format (#1763) --- src/Socket/groups.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Socket/groups.ts b/src/Socket/groups.ts index 7bfbb8f..25ef9e4 100644 --- a/src/Socket/groups.ts +++ b/src/Socket/groups.ts @@ -89,13 +89,16 @@ export const makeGroupsSocket = (config: SocketConfig) => { const result = await groupQuery( jid, 'set', - participants.map( - jid => ({ + [ + { tag: action, attrs: { }, - content: [{ tag: 'participant', attrs: { jid } }] - }) - ) + content: participants.map(jid => ({ + tag: 'participant', + attrs: { jid } + })) + } + ] ) const node = getBinaryNodeChild(result, action) const participantsAffected = getBinaryNodeChildren(node!, 'participant')