From 38bf859f4328b96df911c66cb316f81015e2de08 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Fri, 12 Jul 2024 18:27:24 -0300 Subject: [PATCH] Fix: Resolve issue with group messages when ignore groups is enabled This commit resolves an issue where group messages were not being sent when the 'ignore groups' feature was enabled. The modification in the `whatsapp.baileys.service.ts` file ensures that group messages are sent even if the 'ignore groups' feature is enabled. Additionally, the `CHANGELOG.md` file has been updated to reflect this fix in version 1.8.3. Changes: - src/api/services/channels/whatsapp.baileys.service.ts - CHANGELOG.md --- CHANGELOG.md | 6 ++++++ src/api/services/channels/whatsapp.baileys.service.ts | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1af5a843a..ca8447262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.8.3 (2024-07-03 13:50) + +### Fixed + +* Fixed issue sending group messages when ignore groups enabled + # 1.8.2 (2024-07-03 13:50) ### Fixed diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index d31e02381..f342fed4e 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -2590,7 +2590,7 @@ export class BaileysStartupService extends ChannelStartupService { const group = await this.findGroup({ groupJid: jid }, 'inner'); if (!group) { - new OnWhatsAppDto(jid, false, number); + return new OnWhatsAppDto(jid, false, number); } return new OnWhatsAppDto(group.id, !!group?.id, number, group?.subject); @@ -3260,10 +3260,6 @@ export class BaileysStartupService extends ChannelStartupService { } public async findGroup(id: GroupJid, reply: 'inner' | 'out' = 'out') { - if (this.localSettings.groups_ignore === true) { - return; - } - this.logger.verbose('Fetching group'); try { const group = await this.client.groupMetadata(id.groupJid);