File tree 4 files changed +17
-5
lines changed 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
+
1
12
# 1.2.1 (2023-07-14 19:04)
2
13
3
14
### Fixed
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " evolution-api" ,
3
- "version" : " 1.2.1 " ,
3
+ "version" : " 1.2.2 " ,
4
4
"description" : " Rest api for communication with WhatsApp" ,
5
5
"main" : " ./dist/src/main.js" ,
6
6
"scripts" : {
42
42
"dependencies" : {
43
43
"@adiwajshing/keyed-db" : " ^0.2.4" ,
44
44
"@ffmpeg-installer/ffmpeg" : " ^1.1.0" ,
45
+ "@figuro/chatwoot-sdk" : " ^1.1.14" ,
45
46
"@hapi/boom" : " ^10.0.1" ,
46
47
"@whiskeysockets/baileys" : " github:DavidsonGomes/Baileys" ,
47
- "@figuro/chatwoot-sdk" : " ^1.1.14" ,
48
48
"axios" : " ^1.3.5" ,
49
49
"class-validator" : " ^0.13.2" ,
50
50
"compression" : " ^1.7.4" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { MessageRouter } from './sendMessage.router';
9
9
import { ViewsRouter } from './view.router' ;
10
10
import { WebhookRouter } from './webhook.router' ;
11
11
import { ChatwootRouter } from './chatwoot.router' ;
12
+ import fs from 'fs' ;
12
13
13
14
enum HttpStatus {
14
15
OK = 200 ,
@@ -24,11 +25,14 @@ const router = Router();
24
25
const authType = configService . get < Auth > ( 'AUTHENTICATION' ) . TYPE ;
25
26
const guards = [ instanceExistsGuard , instanceLoggedGuard , authGuard [ authType ] ] ;
26
27
28
+ const packageJson = JSON . parse ( fs . readFileSync ( './package.json' , 'utf8' ) ) ;
29
+
27
30
router
28
31
. get ( '/' , ( req , res ) => {
29
32
res . status ( HttpStatus . OK ) . json ( {
30
33
status : HttpStatus . OK ,
31
34
message : 'Welcome to the Evolution API, it is working!' ,
35
+ version : packageJson . version ,
32
36
} ) ;
33
37
} )
34
38
. use (
Original file line number Diff line number Diff line change @@ -471,8 +471,6 @@ export class ChatwootService {
471
471
return null ;
472
472
}
473
473
474
- console . log ( contact ) ;
475
-
476
474
const contactId = contact . payload . id || contact . payload . contact . id ;
477
475
478
476
if ( ! body . key . fromMe && contact . name === chatId && nameContact !== chatId ) {
@@ -1169,7 +1167,6 @@ export class ChatwootService {
1169
1167
}
1170
1168
1171
1169
if ( event === 'messages.upsert' ) {
1172
- console . log ( body ) ;
1173
1170
this . logger . verbose ( 'event messages.upsert' ) ;
1174
1171
1175
1172
if ( body . key . remoteJid === 'status@broadcast' ) {
You can’t perform that action at this time.
0 commit comments