fix: remove comments

This commit is contained in:
Gabriel Pastori 2023-12-16 18:39:46 -03:00
parent 4ed1edf53d
commit 5aa89d85f3

View File

@ -1019,8 +1019,6 @@ export class ChatwootService {
this.logger.verbose('check if is group');
const chatId =
body.conversation.meta.sender?.phone_number?.replace('+', '') || body.conversation.meta.sender?.identifier;
// Alterado por Edison Martins em 16/12/2023
// const messageReceived = body.content;
const messageReceived = body.content
.replaceAll(/\*((?!\s)([^\n*]+?)(?<!\s))\*/g, '_$1_') // Substitui * por _
.replaceAll(/\*{2}((?!\s)([^\n*]+?)(?<!\s))\*{2}/g, '*$1*') // Substitui ** por *
@ -1483,8 +1481,6 @@ export class ChatwootService {
this.logger.verbose('get conversation message');
// Alterado por Edison Martins em 15/12/2023
// const bodyMessage = await this.getConversationMessage(body.message);
const bodyMessage = await this.getConversationMessage(body.message)
.replaceAll(/\*((?!\s)([^\n*]+?)(?<!\s))\*/g, '**$1**')
.replaceAll(/_((?!\s)([^\n_]+?)(?<!\s))_/g, '*$1*')