Skip to content

Commit

Permalink
Fix: Resolve issue with group messages when ignore groups is enabled
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dgcode-tec committed Jul 12, 2024
1 parent 1d81c79 commit 38bf859
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 1 addition & 5 deletions src/api/services/channels/whatsapp.baileys.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 38bf859

Please sign in to comment.