From 5f795136171c44d1a74f2e39b92a29636fd48112 Mon Sep 17 00:00:00 2001 From: Leandro Rocha Date: Thu, 18 Jan 2024 20:25:58 -0300 Subject: [PATCH] fix: Sending status message --- src/whatsapp/services/whatsapp.service.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/whatsapp/services/whatsapp.service.ts b/src/whatsapp/services/whatsapp.service.ts index f222d5b7..369c0626 100644 --- a/src/whatsapp/services/whatsapp.service.ts +++ b/src/whatsapp/services/whatsapp.service.ts @@ -2420,21 +2420,6 @@ export class WAStartupService { option as unknown as MiscMessageGenerationOptions, ); } - - if (!message['audio']) { - this.logger.verbose('Sending message'); - return await this.client.sendMessage( - sender, - { - forward: { - key: { remoteJid: this.instance.wuid, fromMe: true }, - message, - }, - mentions, - }, - option as unknown as MiscMessageGenerationOptions, - ); - } } if (message['conversation']) { this.logger.verbose('Sending message'); @@ -3097,6 +3082,8 @@ export class WAStartupService { if (!group) throw new BadRequestException('Group not found'); onWhatsapp.push(new OnWhatsAppDto(group.id, !!group?.id, group?.subject)); + } else if (jid === 'status@broadcast') { + onWhatsapp.push(new OnWhatsAppDto(jid, false)); } else { jid = !jid.startsWith('+') ? `+${jid}` : jid; const verify = await this.client.onWhatsApp(jid);