feat: update message sending logic

Refactored sendMessage.controller.ts, chat.dto.ts, and sendMessage.dto.ts to improve message handling. Updated chatwoot.service.ts and sendMessage.router.ts for better integration with Chatwoot. Enhanced whatsapp.baileys.service.ts for more reliable WhatsApp communication. Adjusted chat.schema.ts and message.schema.ts for validation improvements. These changes enhance the overall messaging functionality and reliability.
This commit is contained in:
Davidson Gomes
2024-06-15 12:46:52 -03:00
parent 2d49c73023
commit 85106667a2
8 changed files with 7 additions and 63 deletions

View File

@@ -45,7 +45,7 @@ export const readMessageSchema: JSONSchema7 = {
$id: v4(),
type: 'object',
properties: {
read_messages: {
readMessages: {
type: 'array',
minItems: 1,
uniqueItems: true,
@@ -60,7 +60,7 @@ export const readMessageSchema: JSONSchema7 = {
},
},
},
required: ['read_messages'],
required: ['readMessages'],
};
export const archiveChatSchema: JSONSchema7 = {

View File

@@ -358,16 +358,3 @@ export const listMessageSchema: JSONSchema7 = {
},
required: ['number', 'title', 'footerText', 'buttonText', 'sections'],
};
export const fakeCallSchema: JSONSchema7 = {
$id: v4(),
type: 'object',
properties: {
number: { ...numberDefinition },
delay: {
type: 'integer',
description: 'Enter a value in milliseconds',
},
},
required: ['number', 'delay'],
};