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

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