mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 04:12:23 -06:00
feat: Organization configuration and logo in chatwoot bot contact
This commit is contained in:
@@ -39,22 +39,6 @@ export class ChatwootController {
|
||||
if (data.signMsg === false) data.signDelimiter = null;
|
||||
}
|
||||
|
||||
if (!data.enabled) {
|
||||
data.accountId = '';
|
||||
data.token = '';
|
||||
data.url = '';
|
||||
data.signMsg = false;
|
||||
data.signDelimiter = null;
|
||||
data.reopenConversation = false;
|
||||
data.conversationPending = false;
|
||||
data.importContacts = false;
|
||||
data.importMessages = false;
|
||||
data.mergeBrazilContacts = false;
|
||||
data.daysLimitImportMessages = 0;
|
||||
data.autoCreate = false;
|
||||
data.nameInbox = '';
|
||||
}
|
||||
|
||||
if (!data.nameInbox || data.nameInbox === '') {
|
||||
data.nameInbox = instance.instanceName;
|
||||
}
|
||||
|
||||
@@ -14,4 +14,6 @@ export class ChatwootDto {
|
||||
importMessages?: boolean;
|
||||
daysLimitImportMessages?: number;
|
||||
autoCreate?: boolean;
|
||||
organization?: string;
|
||||
logo?: string;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,8 @@ export class ChatwootService {
|
||||
`${urlServer}/chatwoot/webhook/${encodeURIComponent(instance.instanceName)}`,
|
||||
true,
|
||||
data.number,
|
||||
data.organization,
|
||||
data.logo,
|
||||
);
|
||||
}
|
||||
return data;
|
||||
@@ -161,6 +163,8 @@ export class ChatwootService {
|
||||
webhookUrl: string,
|
||||
qrcode: boolean,
|
||||
number: string,
|
||||
organization?: string,
|
||||
logo?: string,
|
||||
) {
|
||||
const client = await this.clientCw(instance);
|
||||
|
||||
@@ -218,8 +222,8 @@ export class ChatwootService {
|
||||
'123456',
|
||||
inboxId,
|
||||
false,
|
||||
'EvolutionAPI',
|
||||
'https://evolution-api.com/files/evolution-api-favicon.png',
|
||||
organization ? organization : 'EvolutionAPI',
|
||||
logo ? logo : 'https://evolution-api.com/files/evolution-api-favicon.png',
|
||||
)) as any);
|
||||
|
||||
if (!contact) {
|
||||
|
||||
Reference in New Issue
Block a user