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
This commit is contained in:
Davidson Gomes 2024-07-12 18:27:24 -03:00
parent 1d81c79fe6
commit 38bf859f43
2 changed files with 7 additions and 5 deletions

View File

@ -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) # 1.8.2 (2024-07-03 13:50)
### Fixed ### Fixed

View File

@ -2590,7 +2590,7 @@ export class BaileysStartupService extends ChannelStartupService {
const group = await this.findGroup({ groupJid: jid }, 'inner'); const group = await this.findGroup({ groupJid: jid }, 'inner');
if (!group) { if (!group) {
new OnWhatsAppDto(jid, false, number); return new OnWhatsAppDto(jid, false, number);
} }
return new OnWhatsAppDto(group.id, !!group?.id, number, group?.subject); 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') { public async findGroup(id: GroupJid, reply: 'inner' | 'out' = 'out') {
if (this.localSettings.groups_ignore === true) {
return;
}
this.logger.verbose('Fetching group'); this.logger.verbose('Fetching group');
try { try {
const group = await this.client.groupMetadata(id.groupJid); const group = await this.client.groupMetadata(id.groupJid);