fix: Adjusts chatwoot version

This commit is contained in:
Davidson Gomes 2023-07-15 09:37:03 -03:00
parent 85bed0bdf1
commit 1c19b6de1e
4 changed files with 16 additions and 5 deletions

View File

@ -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

View File

@ -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",

View File

@ -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<Auth>('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(

View File

@ -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') {