diff --git a/src/lib/wapi/functions/create-group.js b/src/lib/wapi/functions/create-group.js index ac99851e2..9501a02b3 100644 --- a/src/lib/wapi/functions/create-group.js +++ b/src/lib/wapi/functions/create-group.js @@ -57,5 +57,8 @@ export async function createGroup(name, contactsId) { contactsId = [contactsId]; } + contactsId = await Promise.all(contactsId.map((c) => WAPI.sendExist(c))); + contactsId = contactsId.filter((c) => !c.erro).map((c) => c.id); + return await window.Store.WapQuery.createGroup(name, contactsId); }