#How Exactly Does addParticipants work?

4 messages · Page 1 of 1 (latest)

narrow wing
#

Hi all I'm trying to add a participant to a group chat and the approach I'm using throws no error but it also doesn't add the participant? Is there something glaring that I am doing wrong? Do I have the participantsIDs correct? The approach I'm using is as follows:

const testGChat = await client.getChatById("xxxxxxxxxxxxxxxx@g.us"); await testGChat.addParticipants([message.id.remote]) //this gets that property from a message which I assume is the ID of the sender. It Looks like 234123456789@c.us

urban frigate
narrow wing
# urban frigate Yes, xxxxxxx@c.us is correct

I just figured I could print out the addParticipantsResult object and I got an unknown error.
{ code: 400, message: 'An unknown error occupied while adding a participant', isInviteV4Sent: false }
Not really sure how I will proceed from here to be honest or even how to interpret that.