From 7799e6626fdcfdd2c129bb3aebad3ca551444a70 Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Wed, 12 Jun 2024 15:42:37 -0300 Subject: [PATCH] fix: baileys ignore newsletter --- src/api/services/channels/whatsapp.baileys.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api/services/channels/whatsapp.baileys.service.ts b/src/api/services/channels/whatsapp.baileys.service.ts index 30e662aa..0f4d1d08 100644 --- a/src/api/services/channels/whatsapp.baileys.service.ts +++ b/src/api/services/channels/whatsapp.baileys.service.ts @@ -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, @@ -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,