mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 09:51:24 -06:00
Merge branch 'release/1.3.1'
This commit is contained in:
commit
3e3a175bdc
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "evolution-api",
|
"name": "evolution-api",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "Rest api for communication with WhatsApp",
|
"description": "Rest api for communication with WhatsApp",
|
||||||
"main": "./dist/src/main.js",
|
"main": "./dist/src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -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