mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-01-15 00:02:26 -06:00
fix: baileys and chatwoot
This commit is contained in:
@@ -82,7 +82,7 @@ import { createId as cuid } from '@paralleldrive/cuid2';
|
||||
import { Instance, Message } from '@prisma/client';
|
||||
import { createJid } from '@utils/createJid';
|
||||
import { fetchLatestWaWebVersion } from '@utils/fetchLatestWaWebVersion';
|
||||
import {makeProxyAgent, makeProxyAgentUndici} from '@utils/makeProxyAgent';
|
||||
import { makeProxyAgent, makeProxyAgentUndici } from '@utils/makeProxyAgent';
|
||||
import { getOnWhatsappCache, saveOnWhatsappCache } from '@utils/onWhatsappCache';
|
||||
import { status } from '@utils/renderStatus';
|
||||
import { sendTelemetry } from '@utils/sendTelemetry';
|
||||
@@ -569,15 +569,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
const version = baileysVersion.version;
|
||||
const log = `Baileys version: ${version.join('.')}`;
|
||||
|
||||
// if (session.VERSION) {
|
||||
// version = session.VERSION.split('.');
|
||||
// log = `Baileys version env: ${version}`;
|
||||
// } else {
|
||||
// const baileysVersion = await fetchLatestWaWebVersion({});
|
||||
// version = baileysVersion.version;
|
||||
// log = `Baileys version: ${version}`;
|
||||
// }
|
||||
|
||||
this.logger.info(log);
|
||||
|
||||
this.logger.info(`Group Ignore: ${this.localSettings.groupsIgnore}`);
|
||||
@@ -1130,16 +1121,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
}
|
||||
}
|
||||
|
||||
const messageKey = `${this.instance.id}_${received.key.id}`;
|
||||
const cached = await this.baileysCache.get(messageKey);
|
||||
|
||||
if (cached && !editedMessage && !requestId) {
|
||||
this.logger.info(`Message duplicated ignored: ${received.key.id}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
await this.baileysCache.set(messageKey, true, this.MESSAGE_CACHE_TTL_SECONDS);
|
||||
|
||||
if (
|
||||
(type !== 'notify' && type !== 'append') ||
|
||||
editedMessage ||
|
||||
@@ -1442,7 +1423,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
const cached = await this.baileysCache.get(updateKey);
|
||||
|
||||
if (cached) {
|
||||
this.logger.info(`Message duplicated ignored [avoid deadlock]: ${updateKey}`);
|
||||
this.logger.info(`Update Message duplicated ignored [avoid deadlock]: ${updateKey}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user