Skip to content

Commit

Permalink
chore: πŸ”Š Log group update result
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanderleek committed Dec 16, 2024
1 parent c1c0ea0 commit c8826ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ export async function mutateGroup(groupId: string, phoneNumber: string, operatio
} else {
signale.log(`Removing ${whatsAppId} from group ${groupId}`);
}
await socket.groupParticipantsUpdate(groupId, [whatsAppId], operation);
const updateResult = await socket.groupParticipantsUpdate(groupId, [whatsAppId], operation);
updateResult.forEach((entry) => {
signale.log(`{"id": "${entry.jid}", "status": "${entry.status}"}`);
});
terminate(socket);
}
});
Expand All @@ -185,7 +188,7 @@ export async function listGroupParticipants(groupId: string) {
if (connection === 'open') {
const groupMetadata = await socket.groupMetadata(groupId);
groupMetadata.participants.forEach((participant) => {
signale.log(`{"id": "${participant.id}"}`);
signale.log(`{"id": "${participant.id}"}`);
});
terminate(socket);
}
Expand Down

0 comments on commit c8826ef

Please sign in to comment.