mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 09:51:24 -06:00
fix: Adjusts chatwoot version
This commit is contained in:
parent
85bed0bdf1
commit
1c19b6de1e
10
CHANGELOG.md
10
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)
|
# 1.2.1 (2023-07-14 19:04)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "evolution-api",
|
"name": "evolution-api",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"description": "Rest api for communication with WhatsApp",
|
"description": "Rest api for communication with WhatsApp",
|
||||||
"main": "./dist/src/main.js",
|
"main": "./dist/src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -42,9 +42,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adiwajshing/keyed-db": "^0.2.4",
|
"@adiwajshing/keyed-db": "^0.2.4",
|
||||||
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
||||||
|
"@figuro/chatwoot-sdk": "^1.1.14",
|
||||||
"@hapi/boom": "^10.0.1",
|
"@hapi/boom": "^10.0.1",
|
||||||
"@whiskeysockets/baileys": "github:DavidsonGomes/Baileys",
|
"@whiskeysockets/baileys": "github:DavidsonGomes/Baileys",
|
||||||
"@figuro/chatwoot-sdk": "^1.1.14",
|
|
||||||
"axios": "^1.3.5",
|
"axios": "^1.3.5",
|
||||||
"class-validator": "^0.13.2",
|
"class-validator": "^0.13.2",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
|
@ -9,6 +9,7 @@ import { MessageRouter } from './sendMessage.router';
|
|||||||
import { ViewsRouter } from './view.router';
|
import { ViewsRouter } from './view.router';
|
||||||
import { WebhookRouter } from './webhook.router';
|
import { WebhookRouter } from './webhook.router';
|
||||||
import { ChatwootRouter } from './chatwoot.router';
|
import { ChatwootRouter } from './chatwoot.router';
|
||||||
|
import fs from 'fs';
|
||||||
|
|
||||||
enum HttpStatus {
|
enum HttpStatus {
|
||||||
OK = 200,
|
OK = 200,
|
||||||
@ -24,11 +25,14 @@ const router = Router();
|
|||||||
const authType = configService.get<Auth>('AUTHENTICATION').TYPE;
|
const authType = configService.get<Auth>('AUTHENTICATION').TYPE;
|
||||||
const guards = [instanceExistsGuard, instanceLoggedGuard, authGuard[authType]];
|
const guards = [instanceExistsGuard, instanceLoggedGuard, authGuard[authType]];
|
||||||
|
|
||||||
|
const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
|
||||||
|
|
||||||
router
|
router
|
||||||
.get('/', (req, res) => {
|
.get('/', (req, res) => {
|
||||||
res.status(HttpStatus.OK).json({
|
res.status(HttpStatus.OK).json({
|
||||||
status: HttpStatus.OK,
|
status: HttpStatus.OK,
|
||||||
message: 'Welcome to the Evolution API, it is working!',
|
message: 'Welcome to the Evolution API, it is working!',
|
||||||
|
version: packageJson.version,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.use(
|
.use(
|
||||||
|
@ -471,8 +471,6 @@ export class ChatwootService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(contact);
|
|
||||||
|
|
||||||
const contactId = contact.payload.id || contact.payload.contact.id;
|
const contactId = contact.payload.id || contact.payload.contact.id;
|
||||||
|
|
||||||
if (!body.key.fromMe && contact.name === chatId && nameContact !== chatId) {
|
if (!body.key.fromMe && contact.name === chatId && nameContact !== chatId) {
|
||||||
@ -1169,7 +1167,6 @@ export class ChatwootService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event === 'messages.upsert') {
|
if (event === 'messages.upsert') {
|
||||||
console.log(body);
|
|
||||||
this.logger.verbose('event messages.upsert');
|
this.logger.verbose('event messages.upsert');
|
||||||
|
|
||||||
if (body.key.remoteJid === 'status@broadcast') {
|
if (body.key.remoteJid === 'status@broadcast') {
|
||||||
|
Loading…
Reference in New Issue
Block a user