Skip to content

Commit

Permalink
Merge branch 'release/1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidsonGomes committed Jul 21, 2023
2 parents 7d3ae23 + 4a1aa91 commit 3e3a175
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "evolution-api",
"version": "1.3.0",
"version": "1.3.1",
"description": "Rest api for communication with WhatsApp",
"main": "./dist/src/main.js",
"scripts": {
Expand Down
46 changes: 23 additions & 23 deletions src/whatsapp/whatsapp.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ export async function initInstance() {
configService.get<Auth>('AUTHENTICATION').INSTANCE.WEBHOOK_URL;
logger.verbose('Instance webhook: ' + instanceWebhook);

const chatwootAccountId =
configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_ACCOUNT_ID;
logger.verbose('Chatwoot account id: ' + chatwootAccountId);
// const chatwootAccountId =
// configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_ACCOUNT_ID;
// logger.verbose('Chatwoot account id: ' + chatwootAccountId);

const chatwootToken =
configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_TOKEN;
logger.verbose('Chatwoot token: ' + chatwootToken);
// const chatwootToken =
// configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_TOKEN;
// logger.verbose('Chatwoot token: ' + chatwootToken);

const chatwootUrl = configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_URL;
logger.verbose('Chatwoot url: ' + chatwootUrl);
// const chatwootUrl = configService.get<Auth>('AUTHENTICATION').INSTANCE.CHATWOOT_URL;
// logger.verbose('Chatwoot url: ' + chatwootUrl);

instance.instanceName = instanceName;

Expand All @@ -148,21 +148,21 @@ export async function initInstance() {
}
}

if (chatwootUrl && chatwootToken && chatwootAccountId) {
logger.verbose('Creating chatwoot for instance: ' + instanceName);
try {
chatwootService.create(instance, {
enabled: true,
url: chatwootUrl,
token: chatwootToken,
account_id: chatwootAccountId,
sign_msg: false,
});
logger.verbose('Chatwoot created');
} catch (error) {
logger.log(error);
}
}
// if (chatwootUrl && chatwootToken && chatwootAccountId) {
// logger.verbose('Creating chatwoot for instance: ' + instanceName);
// try {
// chatwootService.create(instance, {
// enabled: true,
// url: chatwootUrl,
// token: chatwootToken,
// account_id: chatwootAccountId,
// sign_msg: false,
// });
// logger.verbose('Chatwoot created');
// } catch (error) {
// logger.log(error);
// }
// }

try {
const state = instance.connectionStatus?.state;
Expand Down

0 comments on commit 3e3a175

Please sign in to comment.