chore: Updated WhatsApp baileys service

Modified the WhatsApp baileys service to improve the overall functionality. This change aims to enhance the user experience and maintain code quality.

Please note that only the 'src/api/services/channels/whatsapp.baileys.service.ts' file has been modified.
This commit is contained in:
Davidson Gomes 2024-06-26 16:13:21 -03:00
parent 79cadadcc7
commit a737fed5cb

View File

@ -3172,7 +3172,7 @@ export class BaileysStartupService extends ChannelStartupService {
if (!isJidGroup(groupJid)) return null;
if (await groupMetadataCache.has(groupJid)) {
this.logger.verbose(`Cache request for group: ${groupJid}`);
console.log(`Cache request for group: ${groupJid}`);
const meta = await groupMetadataCache.get(groupJid);
if (Date.now() - meta.timestamp > 3600000) {
@ -3182,7 +3182,7 @@ export class BaileysStartupService extends ChannelStartupService {
return meta.data;
}
this.logger.verbose(`Cache request for group: ${groupJid} - not found`);
console.log(`Cache request for group: ${groupJid} - not found`);
return await this.updateGroupMetadataCache(groupJid);
}