diff --git a/CHANGELOG.md b/CHANGELOG.md index ee43cbc8..70b4a990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# 1.2.2 (2023-07-15 09:36) + +### Fixed + +* Tweak in route "/" with version info + +### Integrations + +- Chatwoot: v2.18.0 + # 1.2.1 (2023-07-14 19:04) ### Fixed diff --git a/package.json b/package.json index a809ae11..1f313a5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "evolution-api", - "version": "1.2.1", + "version": "1.2.2", "description": "Rest api for communication with WhatsApp", "main": "./dist/src/main.js", "scripts": { @@ -42,9 +42,9 @@ "dependencies": { "@adiwajshing/keyed-db": "^0.2.4", "@ffmpeg-installer/ffmpeg": "^1.1.0", + "@figuro/chatwoot-sdk": "^1.1.14", "@hapi/boom": "^10.0.1", "@whiskeysockets/baileys": "github:DavidsonGomes/Baileys", - "@figuro/chatwoot-sdk": "^1.1.14", "axios": "^1.3.5", "class-validator": "^0.13.2", "compression": "^1.7.4", diff --git a/src/whatsapp/routers/index.router.ts b/src/whatsapp/routers/index.router.ts index 082ffe69..5d8a2c05 100644 --- a/src/whatsapp/routers/index.router.ts +++ b/src/whatsapp/routers/index.router.ts @@ -9,6 +9,7 @@ import { MessageRouter } from './sendMessage.router'; import { ViewsRouter } from './view.router'; import { WebhookRouter } from './webhook.router'; import { ChatwootRouter } from './chatwoot.router'; +import fs from 'fs'; enum HttpStatus { OK = 200, @@ -24,11 +25,14 @@ const router = Router(); const authType = configService.get('AUTHENTICATION').TYPE; const guards = [instanceExistsGuard, instanceLoggedGuard, authGuard[authType]]; +const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8')); + router .get('/', (req, res) => { res.status(HttpStatus.OK).json({ status: HttpStatus.OK, message: 'Welcome to the Evolution API, it is working!', + version: packageJson.version, }); }) .use( diff --git a/src/whatsapp/services/chatwoot.service.ts b/src/whatsapp/services/chatwoot.service.ts index 3f23cfb9..384cedd8 100644 --- a/src/whatsapp/services/chatwoot.service.ts +++ b/src/whatsapp/services/chatwoot.service.ts @@ -471,8 +471,6 @@ export class ChatwootService { return null; } - console.log(contact); - const contactId = contact.payload.id || contact.payload.contact.id; if (!body.key.fromMe && contact.name === chatId && nameContact !== chatId) { @@ -1169,7 +1167,6 @@ export class ChatwootService { } if (event === 'messages.upsert') { - console.log(body); this.logger.verbose('event messages.upsert'); if (body.key.remoteJid === 'status@broadcast') {