From 2037e780456a4a924fbfbd10c8e2917f73428803 Mon Sep 17 00:00:00 2001 From: oismaelash Date: Fri, 4 Oct 2024 16:05:49 -0300 Subject: [PATCH] fix: send message to group without no cache (local or redis) --- .../channel/whatsapp/whatsapp.baileys.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index fb9c1d46..cf45c614 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -1840,7 +1840,7 @@ export class BaileysStartupService extends ChannelStartupService { throw new BadRequestException(isWA); } - const sender = isWA.jid; + const sender = isWA.jid.toLowerCase(); this.logger.verbose(`Sending message to ${sender}`); @@ -3290,10 +3290,10 @@ export class BaileysStartupService extends ChannelStartupService { } } - private async getGroupMetadataCache(groupJid: string) { + private getGroupMetadataCache = async (groupJid: string) => { if (!isJidGroup(groupJid)) return null; - const cacheConf = configService.get('CACHE'); + const cacheConf = this.configService.get('CACHE'); if ((cacheConf?.REDIS?.ENABLED && cacheConf?.REDIS?.URI !== '') || cacheConf?.LOCAL?.ENABLED) { if (await groupMetadataCache?.has(groupJid)) {