mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
test: container mode with chatwoot
This commit is contained in:
parent
8c1600be55
commit
5a3f5f60b6
@ -116,16 +116,16 @@ export async function initInstance() {
|
|||||||
configService.get<Auth>('AUTHENTICATION').INSTANCE.WEBHOOK_URL;
|
configService.get<Auth>('AUTHENTICATION').INSTANCE.WEBHOOK_URL;
|
||||||
logger.verbose('Instance webhook: ' + instanceWebhook);
|
logger.verbose('Instance webhook: ' + instanceWebhook);
|
||||||
|
|
||||||
const chatwootAccountId =
|
// const chatwootAccountId =
|
||||||
configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_ACCOUNT_ID;
|
// configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_ACCOUNT_ID;
|
||||||
logger.verbose('Chatwoot account id: ' + chatwootAccountId);
|
// logger.verbose('Chatwoot account id: ' + chatwootAccountId);
|
||||||
|
|
||||||
const chatwootToken =
|
// const chatwootToken =
|
||||||
configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_TOKEN;
|
// configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_TOKEN;
|
||||||
logger.verbose('Chatwoot token: ' + chatwootToken);
|
// logger.verbose('Chatwoot token: ' + chatwootToken);
|
||||||
|
|
||||||
const chatwootUrl = configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_URL;
|
// const chatwootUrl = configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_URL;
|
||||||
logger.verbose('Chatwoot url: ' + chatwootUrl);
|
// logger.verbose('Chatwoot url: ' + chatwootUrl);
|
||||||
|
|
||||||
instance.instanceName = instanceName;
|
instance.instanceName = instanceName;
|
||||||
|
|
||||||
@ -148,21 +148,21 @@ export async function initInstance() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chatwootUrl && chatwootToken && chatwootAccountId) {
|
// if (chatwootUrl && chatwootToken && chatwootAccountId) {
|
||||||
logger.verbose('Creating chatwoot for instance: ' + instanceName);
|
// logger.verbose('Creating chatwoot for instance: ' + instanceName);
|
||||||
try {
|
// try {
|
||||||
chatwootService.create(instance, {
|
// chatwootService.create(instance, {
|
||||||
enabled: true,
|
// enabled: true,
|
||||||
url: chatwootUrl,
|
// url: chatwootUrl,
|
||||||
token: chatwootToken,
|
// token: chatwootToken,
|
||||||
account_id: chatwootAccountId,
|
// account_id: chatwootAccountId,
|
||||||
sign_msg: false,
|
// sign_msg: false,
|
||||||
});
|
// });
|
||||||
logger.verbose('Chatwoot created');
|
// logger.verbose('Chatwoot created');
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
logger.log(error);
|
// logger.log(error);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const state = instance.connectionStatus?.state;
|
const state = instance.connectionStatus?.state;
|
||||||
|
Loading…
Reference in New Issue
Block a user