From b78b420444fb1c45cd1079a56ac1531eddc01b43 Mon Sep 17 00:00:00 2001 From: SMe12435 Date: Thu, 2 Nov 2023 19:29:20 +0530 Subject: [PATCH] bugFix: promoteParticipant --- src/lib/wapi/functions/get-group-participant-ids.js | 10 +++++----- src/lib/wapi/functions/promote-participant.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/wapi/functions/get-group-participant-ids.js b/src/lib/wapi/functions/get-group-participant-ids.js index e2e1a39de..dd90800ba 100644 --- a/src/lib/wapi/functions/get-group-participant-ids.js +++ b/src/lib/wapi/functions/get-group-participant-ids.js @@ -1,7 +1,7 @@ export async function getGroupParticipantIDs(groupId, done) { - // const output = Promise.resolve(WAPI.group.getParticipants(groupId)).then( - // (participants) => participants.map((p) => p.toJSON()) - // ); - // if (done !== undefined) done(output); - // return output; + const output = Promise.resolve(WAPI.group.getParticipants(groupId)).then( + (participants) => participants.map((p) => p.toJSON()) + ); + if (done !== undefined) done(output); + return output; } diff --git a/src/lib/wapi/functions/promote-participant.js b/src/lib/wapi/functions/promote-participant.js index 7363d5600..86b5d016c 100644 --- a/src/lib/wapi/functions/promote-participant.js +++ b/src/lib/wapi/functions/promote-participant.js @@ -17,13 +17,13 @@ export async function promoteParticipant(groupId, contactsId, done) { return false; } - await window.Store.WapQuery.promoteParticipants(chat.id, contactsId); + // await window.Store.WapQuery.promoteParticipants(chat.id, contactsId); const participants = contactsId.map((c) => chat.groupMetadata.participants.get(c) ); - await window.Store.Participants.promoteParticipants(chat, participants); + await Store.Participants.promoteParticipants(chat, participants); typeof done === 'function' && done(true); return true;