Commit Graph

59 Commits

Author SHA1 Message Date
Davidson Gomes
e321609b93 refactor: Simplify conditional check for contact updates in ChatwootService
Some checks failed
Build Docker image / Build and Deploy (push) Has been cancelled
2025-07-14 14:52:02 -03:00
Willian Coqueiro
37319966db Remove redudantent code 2025-07-09 18:42:35 +00:00
Willian Coqueiro
630f5c5624 fix:
- [Baileys] Trocar @lids em remoteJid por senderPn em todos os serviços;
 - [Baileys] Adicionar valor @lid recebido em remoteJid para previousRemoteJid (Posteriormente utilizasse em ChatwootService);
 - Minors fixes;
2025-07-09 18:35:57 +00:00
Willian Coqueiro
6c0082cd7a feat: adicionar funcionalidade de mesclagem de contatos no Chatwoot 2025-06-17 22:33:51 +00:00
Willian Coqueiro
1afa8df556 refactor(chatwoot): simplify findContact method and update contact creation logic 2025-06-13 19:36:13 +00:00
Davidson Gomes
bfb044b234 feat(whatsapp): enhance contact handling and configuration logic
- Added support for `lid` in WhatsApp numbers router to improve contact identification.
- Updated the contact retrieval logic to accept an object with `phone_number` and `identifier` for better clarity and consistency.
- Enhanced error handling and logging in the Chatwoot service for improved traceability during contact creation and updates.
- Implemented automatic search for the latest WhatsApp version if the CONFIG_SESSION_PHONE_VERSION variable is not set, ensuring users have the most up-to-date integration.
2025-06-13 14:58:01 -03:00
Davidson Gomes
c17b48bca0 fix(chatwoot.service): improve number retrieval logic for message senders
- Enhanced the logic for retrieving sender numbers by introducing a new method that prioritizes senderPn, followed by participant and remoteJid.
- This change ensures more reliable identification of message senders across different scenarios.
2025-06-13 09:10:29 -03:00
Davidson Gomes
534c54a171 fix(chatwoot.service): enhance contact retrieval logic and normalize identifiers
- Updated contact retrieval to handle cases where the identifier is not found, specifically for @lid scenarios.
- Introduced a new method to normalize contact identifiers, prioritizing senderLid and participantLid.
- Improved logging for better traceability during contact lookups and conversation handling.
2025-06-13 08:28:09 -03:00
Davidson Gomes
1eb2c848f7 fix(chatwoot.service): add isLid parameter to service methods for enhanced functionality
- Introduced a new boolean parameter `isLid` in relevant methods to improve the handling of conversation data.
- Updated conditionals to incorporate `isLid` for more precise data management.
- Ensured backward compatibility by maintaining existing functionality while enhancing the service's capabilities.
2025-06-12 12:02:38 -03:00
Davidson Gomes
7cfc359be9 chore: update package-lock.json and refactor WhatsApp Baileys service
- Added new dependency `audio-decode` version 2.2.3.
- Introduced `@eshaz/web-worker` version 1.2.2 with its metadata.
- Refactored `userDevicesCache` initialization and various object destructuring for improved readability in `whatsapp.baileys.service.ts`.
- Streamlined multiple object property assignments for better code clarity.
- Removed deprecated `@typescript-eslint/project-service` and related packages from package-lock.json.
2025-06-12 12:01:01 -03:00
Davidson Gomes
421e762c2d fix(chatwoot.service): Ensure conversation checks are robust before toggling status
- Added null checks for conversation object in reopenConversation mode and when finding unresolved conversations.
- Improved logging for better debugging of conversation retrieval.
2025-06-12 11:18:59 -03:00
Willian Coqueiro
fb18267ac5 fix: eslint 2025-05-27 02:10:15 +00:00
Willian Coqueiro
fc5965938e fix: improve createConversation method with caching and locking mechanisms 2025-05-27 01:31:06 +00: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
Willian Coqueiro
0ca109e9d6 chore: possibilita o envio de medias do tipo .svg 2025-05-22 03:02:04 +00:00
Alex Szefezuk
2545013040 fix: enable sourceId exists in a conversation 2025-05-21 10:36:26 -03:00
edisoncm-ti
a7a9de2903 fix: only fallback caption when audioMessage exists 2025-05-10 16:20:05 -03:00
edisoncm-ti
60a58ca037 fix: not show undefined in caption for received audio messages in group chats 2025-05-10 11:12:44 -03:00
Davidson Gomes
bff3bf564b
Merge pull request #1415 from victoreduardo/victoreduardos/fix-conversation-not-found
fix: Erro na criação de conversation quando já existe uma conversation de outro inbox para o mesmo usuário
2025-05-10 10:31:06 -03:00
Victor Eduardo
8f0ede4207 fix: preventing use conversation from other inbox for the same user 2025-05-03 09:56:28 -03:00
pedro-php
f695e8bdc9 merging with develop 2025-03-28 10:36:34 -03:00
pedro-php
119ceba1ca Adding a new webhook that triggers when a message is updated by the user 2025-03-27 11:13:22 -03:00
Alexis Hernandez
b93ee2e023 fix: chatwoot csat creating new conversation in another language 2025-02-11 08:20:36 -04:00
mbap-dev
6b120e5da2 Fix audio send duplicate from chatwoot. 2025-02-09 20:12:40 -03:00
Davidson Gomes
540467293c Enhance settings and integrate Baileys controller for WhatsApp functionality
- Added `wavoipToken` field to `Setting` model in both MySQL and PostgreSQL schemas.
- Updated `package.json` and `package-lock.json` to include `mime-types` and `socket.io-client` dependencies.
- Introduced `BaileysController` and `BaileysRouter` for handling WhatsApp interactions.
- Refactored media type handling to use `mime-types` instead of `mime` across various services.
- Updated DTOs and validation schemas to accommodate the new `wavoipToken` field.
- Implemented voice call functionalities using the Wavoip service in the Baileys integration.
- Enhanced event handling in the WebSocket controller to support new features.
2025-01-16 11:58:33 -03:00
Davidson Gomes
09a33a423e
Merge pull request #1070 from help-corretora/main
Quando a conversa está aberta e o cliente manda mensagem, o status da conversa muda para pendente.
2024-11-15 10:59:10 -03:00
Vitor
99a533afc1 o chat está colocando a conversa como pendente quando o cliente manda mensagem, esse código visa corrigir isso. 2024-11-14 20:48:47 -03:00
Richards0n
7ef8afa9b3 Refactor phone number formatting in ChatwootService to improve parsing logic 2024-11-11 16:57:04 -03:00
Richards0n
3d51b45e2b feat: format participant phone number in messages 2024-11-08 00:25:00 -03:00
Davidson Gomes
c10680df41 brand 2024-10-21 18:53:21 -03:00
Davidson Gomes
34769e2293 fix: receive medias on chatwoot 2024-10-18 19:49:14 -03:00
Davidson Gomes
84451ba3e0 fix: receive messages on chatwoot 2024-10-18 17:43:43 -03:00
Davidson Gomes
1aeda4e1f4 fix: ads messages in chatwoot 2024-10-17 17:40:37 -03:00
Davidson Gomes
b18e83d293
Merge pull request #986 from deivisonrpg/refactor-onSendMessageError
refactor: Remove unnecessary code for handling contact not in WhatsApp and onSendMessageError
2024-10-17 10:17:32 -03:00
Deivison Lincoln
a6fb8cbd30 refactor: Remove unnecessary code for handling contact not in WhatsApp
The code changes in `whatsapp.baileys.service.ts` remove the unnecessary code that handles the case when a contact is not in WhatsApp. The code was previously sending a notification to Chatwoot, but it is no longer needed. This change improves the code by removing unnecessary complexity.
2024-10-16 15:31:54 -03:00
Richards0n
aa8396d437 refactor: Update content_attributes in ChatwootService
This commit refactors the code in ChatwootService to update the content_attributes when replyToIds are present. Instead of directly spreading the replyToIds object, the code now converts it to a JSON string and appends it to the data object.

Refactor the code to improve readability and maintainability.
2024-10-15 18:01:57 -03:00
Davidson Gomes
0d2125ddff fix: Does not search message without chatwoot Message Id for reply 2024-10-04 18:52:32 -03:00
Davidson Gomes
5c046d51c5 fix: fixed issue of always creating a new label when saving chatwoot 2024-10-04 17:51:32 -03:00
Davidson Gomes
db065ab942 fix: send media message in chatwoot 2024-10-04 17:14:12 -03:00
Davidson Gomes
14d10c00ec chore: chatwoot verbose logs 2024-10-03 17:40:21 -03:00
Davidson Gomes
0ff421121f
Merge pull request #918 from judsonjuniorr/fix/validate-message-before-sending-chatwoot
Fix/validate message before sending chatwoot
2024-09-27 14:02:58 -03:00
Judson Cairo
f9726863ef feat: Update chatwoot source ID and status after sent 2024-09-27 09:40:18 -03:00
Judson Cairo
49ceb44102 fix: Validate if chatwoot connection is available 2024-09-25 13:07:20 -03:00
Judson Cairo
f54a00a07f fix: Validate if source id already exists in chatwoot
Check if message is already saved before sending it
2024-09-25 11:56:51 -03:00
Judson Cairo
e241cf4ee0 feat: Sync lost messages on chatwoot
Runs the sync method every 30min
2024-09-25 11:48:19 -03:00
OlaRonyMax
ae69eb0bce
Visualização única no ChatWoot
Permite receber imagens e vídeos de visualização unica direto no  ChatWoot
2024-09-21 16:26:35 -03:00
Davidson Gomes
cecbf59f46 clear console logs 2024-09-21 13:42:23 -03:00
Davidson Gomes
d3f90a7abd fix: chatwoot integration 2024-09-21 13:41:51 -03:00
Davidson Gomes
4e4caab970 fix: chatwoot integration 2024-09-21 12:34:40 -03:00