Skip to content

Commit

Permalink
fix: baileys ignore newsletter
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidsonGomes committed Jun 12, 2024
1 parent aa79c1b commit 7799e66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/services/channels/whatsapp.baileys.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,9 @@ export class BaileysStartupService extends ChannelStartupService {
shouldIgnoreJid: (jid) => {
const isGroupJid = this.localSettings.groupsIgnore && isJidGroup(jid);
const isBroadcast = !this.localSettings.readStatus && isJidBroadcast(jid);
const isNewsletter = jid.includes('newsletter');

return isGroupJid || isBroadcast;
return isGroupJid || isBroadcast || isNewsletter;
},
msgRetryCounterCache: this.msgRetryCounterCache,
getMessage: async (key) => (await this.getMessage(key)) as Promise<proto.IMessage>,
Expand Down Expand Up @@ -711,8 +712,9 @@ export class BaileysStartupService extends ChannelStartupService {
shouldIgnoreJid: (jid) => {
const isGroupJid = this.localSettings.groupsIgnore && isJidGroup(jid);
const isBroadcast = !this.localSettings.readStatus && isJidBroadcast(jid);
const isNewsletter = jid.includes('newsletter');

return isGroupJid || isBroadcast;
return isGroupJid || isBroadcast || isNewsletter;
},
msgRetryCounterCache: this.msgRetryCounterCache,
getMessage: async (key) => (await this.getMessage(key)) as Promise<proto.IMessage>,
Expand Down

0 comments on commit 7799e66

Please sign in to comment.