Commit Graph

2199 Commits

Author SHA1 Message Date
Davidson Gomes
17fd407d8d
Merge pull request #1494 from KokeroO/develop
fix: melhora a formatação e tratamento de erros na função getExistingSourceIds
2025-05-23 10:43:27 -03:00
Willian Coqueiro
0cdc67effe fix: eslint 2025-05-23 02:40:05 +00:00
Willian Coqueiro
ddaf32be76 fix: melhora a formatação e tratamento de erros na função getExistingSourceIds 2025-05-23 02:18:13 +00:00
Willian Coqueiro
0b2d8a752f fix: melhora o tratamento de erros e otimiza a consulta de IDs de origem no Chatwoot 2025-05-23 02:13:46 +00:00
Davidson Gomes
9cda6a2f99
Merge pull request #1493 from oriondesign2015/develop
corrige estrutura de if/else e bloco try/catch em chatwoot-import-helper.ts
2025-05-22 21:57:33 -03:00
OrionDesign
d2263af3e8 fix: corrige estrutura de if/else e bloco try/catch em chatwoot-import-helper.ts
Esta PR corrige problemas de sintaxe no arquivo chatwoot-import-helper.ts, especificamente:
- Ajusta a estrutura do bloco if/else no método getExistingSourceIds, evitando erro de compilação do TypeScript.
- Garante que o bloco catch esteja corretamente posicionado dentro do método, retornando null em caso de erro.
- Mantém a lógica original do método, apenas corrigindo a sintaxe para permitir a compilação e execução correta do projeto.
Essas correções eliminam o erro de build relacionado ao TypeScript e melhoram a robustez do código ao tratar exceções de forma adequada.
2025-05-22 18:51:28 -03:00
Davidson Gomes
0239638232
Merge pull request #1490 from KokeroO/develop
fix: Corrige o PR1481
2025-05-22 17:08:43 -03:00
Willian Coqueiro
3459d61eff fix: Corrige o PR1481 2025-05-22 20:03:32 +00:00
Davidson Gomes
5330121c49
Merge pull request #1486 from oriondesign2015/develop
fix: Corrige envio da apiKey da instância nos payloads do Flowise e do Dify
2025-05-22 11:24:20 -03:00
OrionDesign
53c1c218c4 fix: Corrige envio da apiKey da instância no payload do Dify
Corrige o envio da apiKey no payload do Dify para usar a apiKey específica da instância ao invés da apiKey global do sistema.
2025-05-22 11:04:13 -03:00
OrionDesign
06378e5d6b fix: Corrige envio da apiKey da instância no payload do Flowise
Corrige o envio da apiKey no payload do Flowise para usar a apiKey específica da instância ao invés da apiKey global do sistema.
2025-05-22 11:03:22 -03:00
Davidson Gomes
6a83e89394
Merge pull request #1485 from oriondesign2015/develop
fix: Corrige envio da apiKey da instância nos payloads do Evolution Bot e N8N
2025-05-22 11:02:21 -03:00
OrionDesign
d24540d6dd fix: Corrige envio da apiKey da instância no payload do N8N
Corrige o envio da apiKey no payload do N8N para usar a apiKey específica da instância ao invés da apiKey global do sistema.
2025-05-22 10:57:41 -03:00
OrionDesign
2af7b24013 fix: Corrige envio da apiKey da instância no payload do Evolution Bot
Corrige o envio da apiKey no payload do Evolution Bot para usar a apiKey específica da instância ao invés da apiKey global do sistema.
2025-05-22 10:56:54 -03:00
Davidson Gomes
6f47a54fae
Merge pull request #1483 from KokeroO/develop
chore: possibilita o envio de medias do tipo [svg, tiff] vindas do Chatwoot
2025-05-22 07:03:41 -03:00
Davidson Gomes
edde059fa1
Merge pull request #1484 from oriondesign2015/develop
fix: melhora consistência e formatação dos chatbots (N8N e Evolution Bot)
2025-05-22 06:58:21 -03:00
OrionDesign
dcb09b87fe fix: corrige comportamento de sessão pausada no N8N
Corrige o problema onde o N8N reativava automaticamente a sessão após receber uma mensagem quando estava pausado. Agora, quando uma sessão está pausada, o bot ignora completamente as mensagens recebidas até que a sessão seja explicitamente reativada através do endpoint de mudança de status.
2025-05-22 01:08:48 -03:00
OrionDesign
bbf142cf39 fix: corrige comportamento de sessão pausada no Evolution Bot
Corrige o problema onde o Evolution Bot reativava automaticamente por qualquer mensagem do usuario quando a sessão estava pausada. Agora, quando uma sessão está pausada, o bot ignora completamente as mensagens recebidas até que a sessão seja explicitamente reativada.
2025-05-22 01:01:51 -03:00
OrionDesign
da51b6bd76 fix: corrige processamento de mensagens subsequentes no Evolution Bot
Corrige o problema onde o Evolution Bot não processava mensagens subsequentes após a primeira resposta. A correção permite que o bot continue respondendo a todas as mensagens enquanto a sessão estiver ativa, melhorando a continuidade da conversa.
2025-05-22 00:54:37 -03:00
Willian Coqueiro
8b15c11817 chore: adiciona suporte para extensão de arquivo .tif no envio de documentos 2025-05-22 03:38:57 +00:00
Willian Coqueiro
272a4de236 chore: possibilita o envio de medias do tipo svg e tiff vindas do Chatwoot 2025-05-22 03:29:16 +00:00
OrionDesign
65111481b9 fix: remove quebras de linha extras nas mensagens do N8n
Corrige o problema de formatação nas mensagens do N8n onde quebras de linha extras estavam sendo adicionadas antes e depois das mídias (imagens, vídeos, etc). Agora o texto é enviado mantendo apenas as quebras de linha intencionais.
2025-05-22 00:17:06 -03:00
Willian Coqueiro
0ca109e9d6 chore: possibilita o envio de medias do tipo .svg 2025-05-22 03:02:04 +00:00
Davidson Gomes
5b817028a9 refactor(chatbot): enhance EvoaiService with OpenAI integration
- Integrated OpenAI service into the EvoaiService to streamline audio message transcription.
- Updated the constructor to initialize OpenaiService, allowing for direct transcription of audio messages.
- Refactored audio message handling to utilize the OpenAI service for improved reliability and maintainability.
- Adjusted the processing logic to handle transcription results more effectively, ensuring fallback content is provided when transcription fails.

This commit focuses on enhancing the EvoaiService's capabilities by leveraging OpenAI for audio transcription, improving overall service functionality and code structure.
2025-05-21 22:27:59 -03:00
Davidson Gomes
6a0fc19702 refactor(chatbot): integrate OpenAI service into chatbot implementations
- Updated various chatbot services (Typebot, Dify, EvolutionBot, Flowise, N8n) to include the OpenAI service for audio transcription capabilities.
- Modified constructors to accept OpenaiService as a dependency, enhancing the ability to transcribe audio messages directly within each service.
- Refactored the handling of `keywordFinish` in multiple controllers and services, changing its type from an array to a string for consistency and simplifying logic.
- Removed redundant audio transcription logic from the base service, centralizing it within the OpenAI service to improve maintainability and reduce code duplication.

This commit focuses on enhancing the chatbot services by integrating OpenAI's transcription capabilities, improving code structure, and ensuring consistent handling of session keywords.
2025-05-21 22:17:10 -03:00
Davidson Gomes
9cedf31eed feat(env): enhance webhook configuration and SSL support
- Added new environment variables for SSL configuration, including `SSL_CONF_PRIVKEY` and `SSL_CONF_FULLCHAIN`, to support secure connections.
- Introduced additional webhook configuration options in the `.env.example` file, such as `WEBHOOK_REQUEST_TIMEOUT_MS`, `WEBHOOK_RETRY_MAX_ATTEMPTS`, and related retry settings to improve webhook resilience and error handling.
- Updated the `bootstrap` function in `main.ts` to handle SSL certificate loading failures gracefully, falling back to HTTP if necessary.
- Enhanced error handling and logging in the `BusinessStartupService` to ensure better traceability and robustness when processing messages.

This commit focuses on improving the security and reliability of webhook interactions while ensuring that the application can handle SSL configurations effectively.
2025-05-21 17:55:00 -03:00
Davidson Gomes
f9567fbeaa refactor(chatbot): unify keywordFinish type and enhance session handling
- Changed the type of `keywordFinish` from an array to a string in multiple DTOs and controller interfaces to simplify data handling.
- Updated the `BaseChatbotService` to include logic for updating session status to 'opened' and managing user responses more effectively.
- Refactored the media message handling in the `BaseChatbotService` to streamline the process and improve readability.
- Enhanced error logging across various services to ensure better traceability during operations.

This commit focuses on improving the structure and consistency of chatbot integrations while ensuring that session management is robust and user-friendly.
2025-05-21 17:02:24 -03:00
Davidson Gomes
d673c83a93 Merge branch 'develop' of github.com:EvolutionAPI/evolution-api into develop 2025-05-21 15:14:50 -03:00
Davidson Gomes
e16bb0e580 style(whatsapp): format code for consistency
- Adjusted spacing in destructuring assignments for `remoteJid` in multiple locations to enhance code readability and maintain consistency with coding standards.
- Removed unnecessary blank lines to streamline the code structure.

This commit focuses on improving the overall style of the `whatsapp.baileys.service.ts` file without altering any functionality.
2025-05-21 15:14:41 -03:00
Davidson Gomes
09120aa026
Merge pull request #1482 from gomessguii/fix/message-query
Refatoração da funcionalidade de chatbots (em andamento)
2025-05-21 15:14:25 -03:00
Davidson Gomes
fbfa364df9 Merge branch 'develop' of github.com:EvolutionAPI/evolution-api into develop 2025-05-21 15:01:22 -03:00
Davidson Gomes
624b37e2aa fix(media): improve media download handling for base64 conversion
- Enhanced the logic for converting media messages to base64 by adding a retry mechanism for downloading media if the initial buffer is not available.
- This change ensures that media messages are reliably converted to base64 format, improving the robustness of media handling in the WhatsApp integration service.
- Updated error logging to capture issues during the media conversion process.
2025-05-21 15:01:17 -03:00
Davidson Gomes
fcde1f9acc
Merge pull request #1481 from AlexSzefezuk/fix-chatwoot-import
Fix-chatwoot-import
2025-05-21 13:54:51 -03:00
Davidson Gomes
cc01787501
Merge pull request #1473 from KokeroO/develop
fix: Deadlock errors and undefined arguments
2025-05-21 13:52:57 -03:00
Guilherme Gomes
c30bae4c3a refactor(openai): improve service initialization and streamline audio transcription handling
- Updated OpenaiService and related classes to enhance the initialization process by ensuring the correct order of parameters.
- Simplified audio message handling by consolidating transcription logic and improving error handling.
- Refactored the OpenaiController to utilize the new structure, ensuring better integration with the base chatbot framework.
- Enhanced logging for better traceability during audio processing and API interactions.
2025-05-21 12:16:12 -03:00
Alex Szefezuk
2545013040 fix: enable sourceId exists in a conversation 2025-05-21 10:36:26 -03:00
Willian Coqueiro
c53a96e757 Fix suggestions 2025-05-20 13:07:28 +00:00
Willian Coqueiro
a2d8642e1c fix: Corrige processamento de documentos sem filename.
## Erros:
- Cannot read properties of null (reading 'fileName')
2025-05-19 23:21:01 +00:00
Willian Coqueiro
9c530c69cf fix: Evita tentar processar media messageContextInfo e disparar um erro generico. 2025-05-19 23:18:23 +00:00
Willian Coqueiro
348a4ff251 fix: Corrige problemas com deadlocks
## Erros:
- code: "40P01", message: "deadlock detected".
- Argument status is missing.
2025-05-19 23:14:57 +00:00
Willian Coqueiro
fc00916345 fix: Corrige o erro Unable to fit integer value '1747658857155' into an INT4 (32-bit signed integer.
## Solução
Após analise dos valores recebidos e seguindo a logica em outras partes também, se confirma que o valor de entrada é de timestamp em ms.
2025-05-19 23:05:11 +00:00
Guilherme Gomes
69b4f1aa02 feat(chatbot): implement base chatbot structure and enhance integration capabilities
- Introduced a base structure for chatbot integrations, including BaseChatbotController and BaseChatbotService.
- Added common DTOs for chatbot settings and data to streamline integration processes.
- Updated existing chatbot controllers (Dify, Evoai, N8n) to extend from the new base classes, improving code reusability and maintainability.
- Enhanced media message handling across integrations, including audio transcription capabilities using OpenAI's Whisper API.
- Refactored service methods to accommodate new message structures and improve error handling.
2025-05-17 16:22:13 -03:00
Davidson Gomes
7cccda10bb
Merge pull request #1456 from thiagoomatheus/main
Fixes issue #879
2025-05-16 13:38:30 -03:00
Davidson Gomes
33c808b195
Merge pull request #1457 from gomessguii/fix/message-query
feat(channel): enhance pushName logic for messages
2025-05-16 12:02:31 -03:00
Guilherme Gomes
d3ee370bdc feat(channel): enhance pushName logic for messages
- Updated the pushName selection to differentiate between group and individual messages.
- Added conditional logic to display the chat name for group messages and the sender's name for individual messages.
2025-05-16 11:33:52 -03:00
thiagoomatheus
7e5740b462 fix(media): allow multiples files with same name 2025-05-15 22:37:55 -03:00
Davidson Gomes
0b33a76394 changelog v2.3.0 2025-05-15 18:49:35 -03:00
Davidson Gomes
6a0b024b13
Merge pull request #1453 from gomessguii/fix/evoai-migration
feat(evoai): add Evoai and EvoaiSetting tables with foreign key const…
2025-05-15 18:20:09 -03:00
Guilherme Gomes
fda6b0d50e feat(evoai): add Evoai and EvoaiSetting tables with foreign key constraints
- Created the Evoai and EvoaiSetting tables in the PostgreSQL migration.
- Defined primary keys and added foreign key constraints to link with the Instance table.
- Included unique index on instanceId for EvoaiSetting to ensure data integrity.
2025-05-15 18:19:23 -03:00
Davidson Gomes
9ec6847683
Merge pull request #1452 from gomessguii/feature/new-manager-version
feat: updated manager to the last version with suport to n8n and EvoA…
2025-05-15 18:12:38 -03:00