From d7c3779ff7da5e5c88e14d5499264392c5a50208 Mon Sep 17 00:00:00 2001 From: Deivison Lincoln Date: Sat, 25 May 2024 10:05:04 -0300 Subject: [PATCH 1/2] fix: Add merge_brazil_contacts flag to ChannelStartupService --- src/api/services/channel.service.ts | 3 +++ src/api/types/wa.types.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/api/services/channel.service.ts b/src/api/services/channel.service.ts index d42c5b1af..ccfb30d1f 100644 --- a/src/api/services/channel.service.ts +++ b/src/api/services/channel.service.ts @@ -306,6 +306,9 @@ export class ChannelStartupService { this.localChatwoot.conversation_pending = data?.conversation_pending; this.logger.verbose(`Chatwoot conversation pending: ${this.localChatwoot.conversation_pending}`); + this.localChatwoot.merge_brazil_contacts = data?.merge_brazil_contacts; + this.logger.verbose(`Chatwoot merge brazil contacts: ${this.localChatwoot.merge_brazil_contacts}`); + this.localChatwoot.import_contacts = data?.import_contacts; this.logger.verbose(`Chatwoot import contacts: ${this.localChatwoot.import_contacts}`); diff --git a/src/api/types/wa.types.ts b/src/api/types/wa.types.ts index 066691e4a..9c33ac6fa 100644 --- a/src/api/types/wa.types.ts +++ b/src/api/types/wa.types.ts @@ -69,6 +69,7 @@ export declare namespace wa { number?: string; reopen_conversation?: boolean; conversation_pending?: boolean; + merge_brazil_contacts?: boolean; import_contacts?: boolean; import_messages?: boolean; days_limit_import_messages?: number; From ca0b0d460262becf822fdfb9f7d47b7c894722d0 Mon Sep 17 00:00:00 2001 From: Deivison Lincoln Date: Sat, 25 May 2024 10:09:37 -0300 Subject: [PATCH 2/2] Add merge_brazil_contacts flag to ChannelStartupService --- src/api/services/channel.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/services/channel.service.ts b/src/api/services/channel.service.ts index ccfb30d1f..ac4eae906 100644 --- a/src/api/services/channel.service.ts +++ b/src/api/services/channel.service.ts @@ -332,6 +332,7 @@ export class ChannelStartupService { this.logger.verbose(`Chatwoot sign delimiter: ${data.sign_delimiter}`); this.logger.verbose(`Chatwoot reopen conversation: ${data.reopen_conversation}`); this.logger.verbose(`Chatwoot conversation pending: ${data.conversation_pending}`); + this.logger.verbose(`Chatwoot merge brazil contacts: ${data.merge_brazil_contacts}`); this.logger.verbose(`Chatwoot import contacts: ${data.import_contacts}`); this.logger.verbose(`Chatwoot import messages: ${data.import_messages}`); this.logger.verbose(`Chatwoot days limit import messages: ${data.days_limit_import_messages}`); @@ -360,7 +361,7 @@ export class ChannelStartupService { this.logger.verbose(`Chatwoot sign delimiter: ${data.sign_delimiter}`); this.logger.verbose(`Chatwoot reopen conversation: ${data.reopen_conversation}`); this.logger.verbose(`Chatwoot conversation pending: ${data.conversation_pending}`); - this.logger.verbose(`Chatwoot merge brazilian contacts: ${data.import_contacts}`); + this.logger.verbose(`Chatwoot merge brazilian contacts: ${data.merge_brazil_contacts}`); this.logger.verbose(`Chatwoot import contacts: ${data.import_contacts}`); this.logger.verbose(`Chatwoot import messages: ${data.import_messages}`); this.logger.verbose(`Chatwoot days limit import messages: ${data.days_limit_import_messages}`);