mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-21 19:47:21 -06:00
Merge pull request #947 from oismaelash/v2.0.0
fix: send message to group without no cache (local or redis)
This commit is contained in:
commit
fcc26f931e
@ -1677,6 +1677,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
ephemeralExpiration?: number,
|
ephemeralExpiration?: number,
|
||||||
// participants?: GroupParticipant[],
|
// participants?: GroupParticipant[],
|
||||||
) {
|
) {
|
||||||
|
sender = sender.toLowerCase();
|
||||||
|
|
||||||
const option: any = {
|
const option: any = {
|
||||||
quoted,
|
quoted,
|
||||||
};
|
};
|
||||||
@ -1838,7 +1840,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
throw new BadRequestException(isWA);
|
throw new BadRequestException(isWA);
|
||||||
}
|
}
|
||||||
|
|
||||||
const sender = isWA.jid;
|
const sender = isWA.jid.toLowerCase();
|
||||||
|
|
||||||
this.logger.verbose(`Sending message to ${sender}`);
|
this.logger.verbose(`Sending message to ${sender}`);
|
||||||
|
|
||||||
@ -3308,10 +3310,10 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getGroupMetadataCache(groupJid: string) {
|
private getGroupMetadataCache = async (groupJid: string) => {
|
||||||
if (!isJidGroup(groupJid)) return null;
|
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 ((cacheConf?.REDIS?.ENABLED && cacheConf?.REDIS?.URI !== '') || cacheConf?.LOCAL?.ENABLED) {
|
||||||
if (await groupMetadataCache?.has(groupJid)) {
|
if (await groupMetadataCache?.has(groupJid)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user