File tree Expand file tree Collapse file tree 4 files changed +17
-5
lines changed
Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 1+ # 1.2.2 (2023-07-15 09:36)
2+
3+ ### Fixed
4+
5+ * Tweak in route "/" with version info
6+ * Adjusts chatwoot version
7+
8+ ### Integrations
9+
10+ - Chatwoot: v2.18.0
11+
112# 1.2.1 (2023-07-14 19:04)
213
314### Fixed
Original file line number Diff line number Diff line change 11{
22 "name" : " evolution-api" ,
3- "version" : " 1.2.1 " ,
3+ "version" : " 1.2.2 " ,
44 "description" : " Rest api for communication with WhatsApp" ,
55 "main" : " ./dist/src/main.js" ,
66 "scripts" : {
4242 "dependencies" : {
4343 "@adiwajshing/keyed-db" : " ^0.2.4" ,
4444 "@ffmpeg-installer/ffmpeg" : " ^1.1.0" ,
45+ "@figuro/chatwoot-sdk" : " ^1.1.14" ,
4546 "@hapi/boom" : " ^10.0.1" ,
4647 "@whiskeysockets/baileys" : " github:DavidsonGomes/Baileys" ,
47- "@figuro/chatwoot-sdk" : " ^1.1.14" ,
4848 "axios" : " ^1.3.5" ,
4949 "class-validator" : " ^0.13.2" ,
5050 "compression" : " ^1.7.4" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { MessageRouter } from './sendMessage.router';
99import { ViewsRouter } from './view.router' ;
1010import { WebhookRouter } from './webhook.router' ;
1111import { ChatwootRouter } from './chatwoot.router' ;
12+ import fs from 'fs' ;
1213
1314enum HttpStatus {
1415 OK = 200 ,
@@ -24,11 +25,14 @@ const router = Router();
2425const authType = configService . get < Auth > ( 'AUTHENTICATION' ) . TYPE ;
2526const guards = [ instanceExistsGuard , instanceLoggedGuard , authGuard [ authType ] ] ;
2627
28+ const packageJson = JSON . parse ( fs . readFileSync ( './package.json' , 'utf8' ) ) ;
29+
2730router
2831 . get ( '/' , ( req , res ) => {
2932 res . status ( HttpStatus . OK ) . json ( {
3033 status : HttpStatus . OK ,
3134 message : 'Welcome to the Evolution API, it is working!' ,
35+ version : packageJson . version ,
3236 } ) ;
3337 } )
3438 . use (
Original file line number Diff line number Diff line change @@ -471,8 +471,6 @@ export class ChatwootService {
471471 return null ;
472472 }
473473
474- console . log ( contact ) ;
475-
476474 const contactId = contact . payload . id || contact . payload . contact . id ;
477475
478476 if ( ! body . key . fromMe && contact . name === chatId && nameContact !== chatId ) {
@@ -1169,7 +1167,6 @@ export class ChatwootService {
11691167 }
11701168
11711169 if ( event === 'messages.upsert' ) {
1172- console . log ( body ) ;
11731170 this . logger . verbose ( 'event messages.upsert' ) ;
11741171
11751172 if ( body . key . remoteJid === 'status@broadcast' ) {
You can’t perform that action at this time.
0 commit comments