From dfb1ee0c568aa12511c8ec818fdb7f82ed4007f3 Mon Sep 17 00:00:00 2001 From: Leandro Santos Rocha Date: Wed, 31 Jan 2024 11:37:19 -0300 Subject: [PATCH] Adjust to use the same jid --- src/whatsapp/services/whatsapp.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/whatsapp/services/whatsapp.service.ts b/src/whatsapp/services/whatsapp.service.ts index 77d5570d..4858e433 100644 --- a/src/whatsapp/services/whatsapp.service.ts +++ b/src/whatsapp/services/whatsapp.service.ts @@ -3130,7 +3130,7 @@ export class WAStartupService { const jids: { groups: { number: string; jid: string }[]; broadcast: { number: string; jid: string }[]; - users: { number: string; jid: string; contact?: string; name?: string }[]; + users: { number: string; jid: string; name?: string }[]; } = { groups: [], broadcast: [], @@ -3145,7 +3145,7 @@ export class WAStartupService { } else if (jid === 'status@broadcast') { jids.broadcast.push({ number, jid }); } else { - jids.users.push({ number, jid, contact: jid }); + jids.users.push({ number, jid }); } }); @@ -3181,7 +3181,7 @@ export class WAStartupService { const query: ContactQuery = { where: { owner: this.instance.name, - id: user.contact, + id: user.jid.startsWith('+') ? user.jid.substring(1) : user.jid;, }, }; const contacts: ContactRaw[] = await this.repository.contact.find(query);