diff --git a/CHANGELOG.md b/CHANGELOG.md index 397ce2e6..53119159 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 2.2.3 (develop) + +### Fixed + +* Fix cache in local file system +* Update Baileys Version + # 2.2.2 (2025-01-31 06:55) ### Features diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index 2de39434..fd8e8e39 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -668,7 +668,7 @@ export class BaileysStartupService extends ChannelStartupService { shouldSyncHistoryMessage: (msg: proto.Message.IHistorySyncNotification) => { return this.historySyncNotification(msg); }, - cachedGroupMetadata: this.getGroupMetadataCache, + // cachedGroupMetadata: this.getGroupMetadataCache, userDevicesCache: this.userDevicesCache, transactionOpts: { maxCommitRetries: 10, delayBetweenTriesMs: 3000 }, patchMessageBeforeSending(message) { @@ -1562,11 +1562,11 @@ export class BaileysStartupService extends ChannelStartupService { 'groups.update': (groupMetadataUpdate: Partial[]) => { this.sendDataWebhook(Events.GROUPS_UPDATE, groupMetadataUpdate); - groupMetadataUpdate.forEach((group) => { - if (isJidGroup(group.id)) { - this.updateGroupMetadataCache(group.id); - } - }); + // groupMetadataUpdate.forEach((group) => { + // if (isJidGroup(group.id)) { + // this.updateGroupMetadataCache(group.id); + // } + // }); }, 'group-participants.update': (participantsUpdate: { @@ -1576,7 +1576,7 @@ export class BaileysStartupService extends ChannelStartupService { }) => { this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, participantsUpdate); - this.updateGroupMetadataCache(participantsUpdate.id); + // this.updateGroupMetadataCache(participantsUpdate.id); }, }; @@ -2160,9 +2160,10 @@ export class BaileysStartupService extends ChannelStartupService { if (isJidGroup(sender)) { let group; try { - const cache = this.configService.get('CACHE'); - if (!cache.REDIS.ENABLED && !cache.LOCAL.ENABLED) group = await this.findGroup({ groupJid: sender }, 'inner'); - else group = await this.getGroupMetadataCache(sender); + // const cache = this.configService.get('CACHE'); + // if (!cache.REDIS.ENABLED && !cache.LOCAL.ENABLED) group = await this.findGroup({ groupJid: sender }, 'inner'); + // else group = await this.getGroupMetadataCache(sender); + group = await this.findGroup({ groupJid: sender }, 'inner'); } catch (error) { throw new NotFoundException('Group not found'); }