Skip to content

Commit c16f962

Browse files
chore: compreensive var name for conversation term
1 parent ecbf90d commit c16f962

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/whatsapp/services/chatwoot.service.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ export class ChatwootService {
949949

950950
public async receiveWebhook(instance: InstanceDto, body: any) {
951951
try {
952-
// espera 500ms para evitar duplicidade de mensagens
952+
// espera 500ms para evitar duplicidade de mensagens
953953
await new Promise((resolve) => setTimeout(resolve, 500));
954954

955955
this.logger.verbose('receive webhook to chatwoot instance: ' + instance.instanceName);
@@ -1284,9 +1284,9 @@ export class ChatwootService {
12841284
}
12851285

12861286
this.logger.verbose('get conversation in chatwoot');
1287-
const getConversion = await this.createConversation(instance, body);
1287+
const getConversation = await this.createConversation(instance, body);
12881288

1289-
if (!getConversion) {
1289+
if (!getConversation) {
12901290
this.logger.warn('conversation not found');
12911291
return;
12921292
}
@@ -1337,7 +1337,7 @@ export class ChatwootService {
13371337
}
13381338

13391339
this.logger.verbose('send data to chatwoot');
1340-
const send = await this.sendData(getConversion, fileName, messageType, content);
1340+
const send = await this.sendData(getConversation, fileName, messageType, content);
13411341

13421342
if (!send) {
13431343
this.logger.warn('message not sent');
@@ -1358,7 +1358,7 @@ export class ChatwootService {
13581358
this.logger.verbose('message is not group');
13591359

13601360
this.logger.verbose('send data to chatwoot');
1361-
const send = await this.sendData(getConversion, fileName, messageType, bodyMessage);
1361+
const send = await this.sendData(getConversation, fileName, messageType, bodyMessage);
13621362

13631363
if (!send) {
13641364
this.logger.warn('message not sent');
@@ -1394,7 +1394,7 @@ export class ChatwootService {
13941394
}
13951395

13961396
this.logger.verbose('send data to chatwoot');
1397-
const send = await this.createMessage(instance, getConversion, content, messageType);
1397+
const send = await this.createMessage(instance, getConversation, content, messageType);
13981398

13991399
if (!send) {
14001400
this.logger.warn('message not sent');
@@ -1415,7 +1415,7 @@ export class ChatwootService {
14151415
this.logger.verbose('message is not group');
14161416

14171417
this.logger.verbose('send data to chatwoot');
1418-
const send = await this.createMessage(instance, getConversion, bodyMessage, messageType);
1418+
const send = await this.createMessage(instance, getConversation, bodyMessage, messageType);
14191419

14201420
if (!send) {
14211421
this.logger.warn('message not sent');
@@ -1452,14 +1452,14 @@ export class ChatwootService {
14521452
}
14531453

14541454
// if (event === 'connection.update') {
1455-
// this.logger.verbose('event connection.update');
1455+
// this.logger.verbose('event connection.update');
14561456

1457-
// if (body.status === 'open') {
1458-
// const msgConnection = `🚀 Connection successfully established!`;
1457+
// if (body.status === 'open') {
1458+
// const msgConnection = `🚀 Connection successfully established!`;
14591459

1460-
// this.logger.verbose('send message to chatwoot');
1461-
// await this.createBotMessage(instance, msgConnection, 'incoming');
1462-
// }
1460+
// this.logger.verbose('send message to chatwoot');
1461+
// await this.createBotMessage(instance, msgConnection, 'incoming');
1462+
// }
14631463
// }
14641464

14651465
if (event === 'qrcode.updated') {

0 commit comments

Comments
 (0)