mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: normalize participants API
This commit is contained in:
@@ -216,7 +216,9 @@ const makeGroupsSocket = (config: LegacySocketConfig) => {
|
|||||||
const result: GroupModificationResponse = await groupQuery(action, id, null, participants)
|
const result: GroupModificationResponse = await groupQuery(action, id, null, participants)
|
||||||
const jids = Object.keys(result.participants || {})
|
const jids = Object.keys(result.participants || {})
|
||||||
ev.emit('group-participants.update', { id, participants: jids, action })
|
ev.emit('group-participants.update', { id, participants: jids, action })
|
||||||
return jids
|
return Object.keys(result.participants || {}).map(
|
||||||
|
jid => ({ jid, status: result.participants?.[jid] })
|
||||||
|
)
|
||||||
},
|
},
|
||||||
/** Query broadcast list info */
|
/** Query broadcast list info */
|
||||||
getBroadcastListInfo: async(jid: string) => {
|
getBroadcastListInfo: async(jid: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user