Revert "V2 fix chatwoot reply quote"

This commit is contained in:
Davidson Gomes
2024-09-05 09:26:33 -03:00
committed by GitHub
parent 2c7288e888
commit ff78954383
9 changed files with 388 additions and 1432 deletions

View File

@@ -204,7 +204,7 @@ export class InstanceController {
const urlServer = this.configService.get<HttpServer>('SERVER').URL;
try {
await this.chatwootService.create(instance, {
this.chatwootService.create(instance, {
enabled: true,
accountId: instanceData.chatwootAccountId,
token: instanceData.chatwootToken,
@@ -220,10 +220,10 @@ export class InstanceController {
daysLimitImportMessages: instanceData.chatwootDaysLimitImportMessages ?? 60,
organization: instanceData.chatwootOrganization,
logo: instanceData.chatwootLogo,
autoCreate: instanceData.chatwootAutoCreate ?? true,
autoCreate: instanceData.chatwootAutoCreate !== false,
});
} catch (error) {
this.logger.error(error);
this.logger.log(error);
}
return {

View File

@@ -1477,7 +1477,7 @@ export class ChatwootService {
let inReplyToExternalId = null;
if (msg) {
inReplyToExternalId = msg.message?.extendedTextMessage?.contextInfo?.stanzaId ?? msg.contextInfo?.stanzaId;
inReplyToExternalId = msg.message?.extendedTextMessage?.contextInfo?.stanzaId;
if (inReplyToExternalId) {
const message = await this.getMessageByKeyId(instance, inReplyToExternalId);
if (message?.chatwootMessageId) {

View File

@@ -20,6 +20,8 @@ export class CacheEngine {
logger.verbose(`LocalCache initialized for ${module}`);
this.engine = new LocalCache(configService, module);
}
}
public getEngine() {