Commit Graph

533 Commits

Author SHA1 Message Date
Davidson Gomes
3c2ea5c67c feat: Re-enable group metadata caching in Baileys service
- Restore group metadata caching mechanisms
- Uncomment cache-related methods for group updates and participants
- Implement conditional group metadata retrieval based on cache configuration
2025-02-02 16:42:17 -03:00
Davidson Gomes
9109b140a9
Merge pull request #1192 from tonimoreiraa/fix-dify-truncated-messages
fix(dify-service): Truncated messages (agent bot)
2025-02-01 16:11:07 -03:00
Davidson Gomes
ff5a8adc71
Merge pull request #1190 from GrimBit1/main
Fix Message deletion in Whatsapp Bailey Service
2025-02-01 16:08:56 -03:00
Toni Moreira
fc84e0f327
fix: dify truncated messages 2025-02-01 11:47:50 -03:00
Aditya Nandwana
c1494ca035 Refactor logical message deletion in BaileysStartupService 2025-02-01 16:09:08 +05:30
Davidson Gomes
f8f1cbf4a2 fix: Disable group metadata caching in Baileys service
- Remove group metadata caching mechanisms
- Modify group-related cache update methods
- Simplify group metadata retrieval process
2025-01-31 17:44:44 -03:00
Davidson Gomes
96549664c9
Merge pull request #1179 from MarceloSoaresJr/develop
bugfix: SQL query column quoting in ChannelStartupService
2025-01-28 18:41:14 -03:00
Davidson Gomes
fa19c7fa89 feat(rabbitmq): Add prefix key configuration for queue names 2025-01-28 18:01:28 -03:00
Marcelo Soares
503728e1e7
fix: SQL query column quoting in ChannelStartupService 2025-01-27 17:42:04 -03:00
Davidson Gomes
f340f7716f Remove unused dependencies from ChannelController to streamline integration logic 2025-01-22 11:14:05 -03:00
Davidson Gomes
f7db442a94 Refactor Instance Management with Additional Profile Information
- Added new fields `ownerJid`, `profileName`, and `profilePicUrl` to the Instance DTO for improved user identification and personalization.
- Updated InstanceController to include the new profile information in instance data handling.
- Enhanced WAMonitoringService to utilize the additional profile fields, improving the context of instance data during monitoring operations.
2025-01-22 11:09:05 -03:00
Davidson Gomes
3a04f7587e Refactor Evolution Channel with new instance management and media handling features
- Added `setInstance` method to manage instance details and trigger events for instance creation.
- Refactored `connectToWhatsapp` to improve error handling and streamline connection logic.
- Enhanced `sendMessageWithTyping` to support various message types including buttons and lists, and integrated file handling for media messages.
- Updated `processAudio` to handle audio conversion using an external API, improving audio processing capabilities.
- Introduced new methods for sending button messages and handling audio messages, enhancing user interaction features.
- Improved contact update logic to ensure accurate data synchronization with the database and external services.
2025-01-22 11:06:10 -03:00
Davidson Gomes
666c0b514d Chats filtering to support timestamp range queries
- Introduced a new `timestampFilter` to allow filtering messages based on `messageTimestamp` within specified `gte` and `lte` ranges.
- Updated SQL query logic in `ChannelStartupService` to incorporate the timestamp filtering, improving message retrieval accuracy.
2025-01-22 10:22:09 -03:00
Davidson Gomes
ab5eb80edd Refactor JID creation and fetch chats
- Introduced a new utility function `createJid` to standardize JID creation across the application, replacing the previous method in `ChannelStartupService`.
- Updated multiple services to utilize the new `createJid` function for improved consistency and maintainability.
- Added a `cleanMessageData` method in `ChannelStartupService` to sanitize message objects before processing.
- Updated CHANGELOG to reflect the refactor on chat fetching logic and the introduction of the new JID utility.
2025-01-22 10:16:48 -03:00
Davidson Gomes
cfe6bd9ae0 Refactor instance deletion logic and enhance WhatsApp connection updates
- Updated the `deleteInstance` method to allow logout for instances in 'connecting' or 'open' states, improving instance management.
- Enhanced the `BaileysStartupService` to include additional profile information (wuid, profileName, profilePictureUrl) in connection update webhooks.
- Removed redundant webhook data sending logic, streamlining connection state updates for better performance.
- Adjusted settings schema to ensure required fields are properly validated.
2025-01-17 17:54:18 -03:00
Davidson Gomes
cb08f6b152 Refactor WebhookController to implement retry logic for webhook requests
- Introduced a new `retryWebhookRequest` method to handle retries for failed webhook requests, allowing up to 10 attempts with a delay of 30 seconds between each.
- Updated error logging to provide detailed information on each retry attempt, including the attempt number and error details.
- Enhanced existing webhook request handling to utilize the new retry logic, improving reliability in sending webhook data.
- Modified error messages to be more informative, indicating when all retry attempts have failed.
2025-01-17 16:06:23 -03:00
Davidson Gomes
a817d62067 Enhance message filtering in ChannelStartupService to support timestamp range queries
- Added support for filtering messages based on a timestamp range in the `ChannelStartupService`.
- Introduced a `timestampFilter` object to handle `gte` and `lte` conditions for `messageTimestamp`.
- Updated message count queries to include the new timestamp filtering logic.
2025-01-16 17:40:19 -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
d598c4ed0b Update ESLint configuration, Dockerfile, and package dependencies; refactor bot trigger logic
- Updated ESLint configuration to use TypeScript project references and adjusted parser options.
- Modified Dockerfile to include OpenSSL in both builder and final stages.
- Changed `mime` package version from `^4.0.6` to `^3.0.0` in `package.json` and updated TypeScript ESLint packages to `^6.21.0`.
- Refactored `findBotByTrigger` function to remove unnecessary settings repository parameter.
- Adjusted bot trigger logic in multiple controller files to streamline function calls.
2025-01-09 12:57:21 -03:00
Jesus
236b0f9b26 Fix import prisma types 2025-01-07 08:59:51 +01:00
Jesus
0f2498bbaa Fix prettier errors 2025-01-07 08:50:34 +01:00
Jesus
a82669b6fa Improve chat update and fix unread messages 2025-01-07 08:25:37 +01:00
Jesus
72a33ae59f fix: lint and prettify 2025-01-07 08:25:37 +01:00
Jesus
425d340956 Fix: cuid security deprecacion 2025-01-07 08:25:37 +01:00
Davidson Gomes
18626c9846
Merge pull request #1131 from FaelN1/develop
fix: include filename in media message payload for WhatsApp Business
2025-01-06 12:20:19 -03:00
Davidson Gomes
6212ee3eb0
Merge pull request #1125 from fmorett/patch-1
fix cannot read null of mentioned
2025-01-06 12:18:56 -03:00
Davidson Gomes
8c877029e5
Merge pull request #1124 from ScrashOff/fix/instance-creation-webhook-and-chatwoot-settings
fix: instance create w/webhook and chatwoot settings
2025-01-06 12:18:25 -03:00
Rafael Nicolas Barbosa Moreira
e0c960cc54 chore: remove redundant comment about filename condition 2025-01-03 16:35:14 -03:00
Rafael Nicolas Barbosa Moreira
08ceb803c8 fix: conditionally include filename for non-image media 2025-01-03 16:33:34 -03:00
Rafael Nicolas Barbosa Moreira
6b72550286 fix: include filename in media message payload for WhatsApp Business 2025-01-03 15:56:39 -03:00
Fabio Moretti
df0990df0f
fix cannot read null of mentioned 2024-12-28 02:15:26 +01:00
Fellipe "ScrashOff
60c9e231be fix: instance create w/webhook and chatwoot settings 2024-12-27 16:58:15 -03:00
MarksonSolutions
bfba702fde send audio using sendWhatsAppAudio route, wabussines 2024-12-20 16:00:15 -04:00
Davidson Gomes
682eaa995f
Merge pull request #1088 from joaosantanadev/develop
[FIX]Correction of webhook global
2024-11-27 12:10:52 -03:00
joaosantanadev
370025b8f9 Correction of webhook global 2024-11-25 12:59:48 -03:00
Pedro Ivo
5d13f7055b
Merge remote-tracking branch 'refs/remotes/evo/develop'
# Conflicts:
#	prisma/mysql-schema.prisma
#	src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts
2024-11-22 10:11:50 -03:00
Davidson Gomes
d5a7e03ec2
Merge pull request #1012 from yousseefspires/fix/chats-messages
Add unique in Chat by instance/remotejid
2024-11-21 14:48:40 -03:00
Pedro Ivo
6e6711a5af
fix: get instance id in right place on handle label 2024-11-19 10:26:01 -03:00
Pedro Ivo
013fa9dc08
fix: join is considering instance id 2024-11-19 10:17:49 -03:00
Pedro Ivo
a42bc988ec
fix: add/remove saving on db and improve add query for startup case 2024-11-19 10:15:08 -03:00
Pedro Ivo
ecbbc5b090
fix: avoid concurrency cases in label handler 2024-11-17 20:04:27 -03:00
Alan Cezar
1d5508736e corrigido o envio de áudio para OpenAI 2024-11-15 17:57:38 -03:00
Pedro Ivo
cefe3ef6c3
fix: chats must be unique 2024-11-15 17:38:26 -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
Davidson Gomes
b603021f56
Merge pull request #1067 from Alexandre-Prado/fix-chatbots-send-message
fix: esvazia textBuffer dos chatbots no sendMessageWhatsapp quando splitMessages é true
2024-11-14 18:37:07 -03:00
Davidson Gomes
7bf0fd1c36
Merge pull request #1058 from Richards0nd/newPhoneNumberContent
Correção: Número de telefone apresentado no nome do contato (CW Service)
2024-11-14 18:36:43 -03:00
Davidson Gomes
52cf4fa8b8
Merge pull request #1069 from AlanCezarAraujo/fix/whatsapp-images
Correção de Imagens no Cloud API
2024-11-14 18:36:24 -03:00
Alan Cezar
ef7574273c message recorded for no media messages 2024-11-14 09:11:21 -03:00
Alan Cezar
d797d8177c added isMediaMessage method 2024-11-14 09:10:11 -03:00