mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
Update whatsapp.service.ts
This commit is contained in:
parent
fd82aa143c
commit
ffe1523170
@ -2156,7 +2156,7 @@ export class WAStartupService {
|
|||||||
|
|
||||||
const onWhatsapp: OnWhatsAppDto[] = [];
|
const onWhatsapp: OnWhatsAppDto[] = [];
|
||||||
for await (const number of data.numbers) {
|
for await (const number of data.numbers) {
|
||||||
const jid = this.createJid(number);
|
let jid = this.createJid(number);
|
||||||
|
|
||||||
if (isJidGroup(jid)) {
|
if (isJidGroup(jid)) {
|
||||||
const group = await this.findGroup({ groupJid: jid }, 'inner');
|
const group = await this.findGroup({ groupJid: jid }, 'inner');
|
||||||
@ -2165,6 +2165,7 @@ export class WAStartupService {
|
|||||||
|
|
||||||
onWhatsapp.push(new OnWhatsAppDto(group.id, !!group?.id, group?.subject));
|
onWhatsapp.push(new OnWhatsAppDto(group.id, !!group?.id, group?.subject));
|
||||||
} else {
|
} else {
|
||||||
|
jid = (!jid.startsWith('+')) ? `+${jid}` : jid;
|
||||||
const verify = await this.client.onWhatsApp(jid);
|
const verify = await this.client.onWhatsApp(jid);
|
||||||
|
|
||||||
const result = verify[0];
|
const result = verify[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user