fix: send message to group without no cache (local or redis)

This commit is contained in:
oismaelash 2024-10-04 16:05:49 -03:00
parent 7b41d333d7
commit 2037e78045

View File

@ -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<CacheConf>('CACHE');
const cacheConf = this.configService.get<CacheConf>('CACHE');
if ((cacheConf?.REDIS?.ENABLED && cacheConf?.REDIS?.URI !== '') || cacheConf?.LOCAL?.ENABLED) {
if (await groupMetadataCache?.has(groupJid)) {