Commit Graph

791 Commits

Author SHA1 Message Date
Davidson Gomes
5d91876974 feat: Restart WebSocket connection on Wavoip token update
- Added logic to restart the WebSocket connection in `ChannelStartupService` when a valid `wavoipToken` is set, ensuring the client reconnects with updated settings.
2025-05-29 19:43:54 -03:00
Davidson Gomes
5043ce8405 feat: Integrate Wavoip for voice call functionality
- Added Wavoip integration to support voice calls within the application.
- Introduced `wavoipToken` in various DTOs and models to manage authentication.
- Updated `ChannelStartupService` to handle Wavoip settings and events.
- Enhanced `BaileysStartupService` to utilize Wavoip for call signaling.
- Updated CHANGELOG.md to version 1.8.7.
2025-05-29 19:20:09 -03:00
Davidson Gomes
8e65526ce9 Merge branch 'v1.8' of github.com:EvolutionAPI/evolution-api into v1.8 2025-05-22 16:53:28 -03:00
Davidson Gomes
cae016f40a fix: Prevent duplicate contact processing in ChannelStartupService
- Added a Set to track seen contact IDs, ensuring that each contact is processed only once when fetching messages. This change improves efficiency and prevents redundant database queries.
2025-05-22 16:53:18 -03:00
Guilherme Gomes
f95727edbf fix: Update message model and enhance media handling in Baileys service
- Changed the type of `message` in `MessageRaw` from `object` to `any` for better flexibility.
- Improved media message handling in `BaileysStartupService` to support base64 encoding for various media types, enhancing webhook functionality.
- Added logging for media message detection to aid in debugging.
2025-05-22 16:50:42 -03:00
Davidson Gomes
cee6498ea0 feat: Adds method to fetch contacts with last message
- Implements the `fetchContactsWithLastMessage` method in `ChatController` to retrieve contacts and their last messages.
- Updates `ChatRouter` to include the new route that calls the above method.
- Adds logic in `ChannelStartupService` to fetch contacts and their last messages, improving contact management functionality.
2025-05-12 12:48:05 -03:00
Davidson Gomes
86c603b3a1 feat: Updates RabbitMQ with new optimizations and configurations
- Implements Retry and Reconnect system in the integration with RabbitMQ.
- Adds optimizations with parameterized configurations via environment variables (MESSAGE_TTL, MAX_LENGTH and MAX_LENGTH_BYTES).
- Introduces non-persistent messages to reduce disk usage and automatic cleaning of expired messages in queues.
- Updates the version to 1.8.6 in package.json and CHANGELOG.md.
2025-04-30 15:44:12 -03:00
Davidson Gomes
960efcecd5 fix: Retry and Reconnect system in rabbitmq integration 2025-04-28 17:11:19 -03:00
Davidson Gomes
cc6adf0ee2 chore: Update Baileys version and re-enable instance management methods
- Switched Baileys dependency to EvolutionAPI repository
- Re-enabled delInstanceTime and deleteTempInstances methods in monitoring services
- Updated CHANGELOG.md to version 1.8.5
2025-01-31 13:52:02 -03:00
Davidson Gomes
6990a2c9c0 test: delete instances 2025-01-29 15:24:40 -03:00
Davidson Gomes
b60215100e feat: Implement retry mechanism for webhook requests in ChannelStartupService
- Added a new private method `retryWebhookRequest` to handle retries for webhook requests, improving reliability in case of failures.
- Updated `sendDataWebhook` method to utilize the new retry mechanism for both local and global webhooks, enhancing error handling and logging.
- Improved logging to provide clearer messages on retry attempts and final error reporting.

These changes enhance the robustness of webhook handling in the application.
2025-01-17 16:04:41 -03:00
Davidson Gomes
03ee40388c chore: Bump version to 1.8.4 and update logging in services
- Updated package version from 1.8.2 to 1.8.4 in package.json.
- Refactored instance.controller.ts to allow logout for both 'connecting' and 'open' states, improving instance management.
- Commented out unnecessary logging in channel.service.ts to enhance code clarity.
- Enhanced logging in whatsapp.baileys.service.ts to include instance details in CONNECTION_UPDATE events, improving webhook data sent during connection state changes.

These changes improve versioning, code clarity, and logging functionality across the application.
2025-01-17 15:40:36 -03:00
Davidson Gomes
6ddad8e85a refactor: Simplify queue name generation and update AMQP publish method
- Refactored the queue name generation logic in `channel.service.ts` to improve readability by using a conditional operator.
- Updated the `bindQueue` method to use `queueName` instead of `event` for better clarity in `channel.service.ts`.
- Commented out unused phone number parsing logic in `whatsapp.baileys.service.ts` to clean up the code and improve maintainability.
- Made `isLatest` property optional in the type definition for better flexibility.

These changes enhance code clarity and maintainability across the services.
2024-12-19 11:12:11 -03:00
Davidson Gomes
555fa606ea fix: Update PrivacySetting groupadd type and enhance error handling in fetchInstances route
- Changed the type of `groupadd` in `PrivacySetting` from `WAPrivacyValue` to `any` to allow for more flexible data handling.
- Wrapped the `fetchInstances` route in a try-catch block to improve error handling and logging, ensuring that any errors are logged and a proper error response is returned to the client.

These changes enhance the robustness of the API and improve type flexibility in the DTO.
2024-12-11 15:53:58 -03:00
Davidson Gomes
ca474236b0 feat: Add PREFIX_KEY configuration for RabbitMQ integration
- Introduced a new optional PREFIX_KEY in the RabbitMQ configuration to allow custom queue naming.
- Updated the AMQP server and channel service to utilize PREFIX_KEY when initializing queues.
- Modified the dev environment configuration to include PREFIX_KEY.

This enhancement improves the flexibility of queue naming in RabbitMQ, facilitating better organization and management of queues.
2024-12-11 15:33:01 -03:00
raimartinsb
91f009a617 fix: Correção das mídias como anexo no chatwoot quando usamos uma Instance da Meta e enviando nome do arquivo para a meta 2024-08-12 10:52:56 -03:00
Davidson Gomes
38bf859f43 Fix: Resolve issue with group messages when ignore groups is enabled
This commit resolves an issue where group messages were not being sent when the 'ignore groups' feature was enabled. The modification in the `whatsapp.baileys.service.ts` file ensures that group messages are sent even if the 'ignore groups' feature is enabled. Additionally, the `CHANGELOG.md` file has been updated to reflect this fix in version 1.8.3.

Changes:
- src/api/services/channels/whatsapp.baileys.service.ts
- CHANGELOG.md
2024-07-12 18:27:24 -03:00
Joao Pedro
c55885b366 Fix: groups_ignore in /instance/create and maintaining compatibility 2024-07-06 21:59:41 -03:00
Davidson Gomes
18ebe27bc3 "chore: Updated package and documentation versions to v1.8.2"
Explanation:
This commit updates the package and documentation versions to v1.8.2. The package.json and swagger.yaml files were modified accordingly. These changes are mainly for maintenance purposes and do not affect the functionality of the application.
2024-07-03 13:51:16 -03:00
Davidson Gomes
a8121d7fe6 fix: Correction in global RabbitMQ queue name
Fix global RabbitMQ queue name in `channel.service.ts` and update CHANGELOG.md.
The queue name has been changed from `transformedWe` to `event`.
This fix prevents queue errors and ensures correct functionality of inter-service communication.
2024-07-03 13:47:25 -03:00
Davidson Gomes
b63b7b0b7b fix: Generate pairing code and update Baileys repository
Update package.json to use the new Baileys repository and modify the Whatsapp Baileys service to generate a pairing code. This change fixes the issue with the previous Baileys repository and improves the pairing process for Whatsapp.

Changes:
- Update package.json to use the new Baileys repository
- Modify Whatsapp Baileys service to generate a pairing code
- Fix issue with previous Baileys repository
- Improve pairing process for Whatsapp
2024-07-03 13:45:05 -03:00
Davidson Gomes
14ea5d959f Merge pull request #662 from drauber/cwId_missing
Add -cwId- when findByName
2024-06-26 10:32:09 -03:00
Douglas Rauber at Nitro
86b2999fcf Add -cwId- when findByName 2024-06-24 10:37:54 -03:00
Davidson Gomes
f5bd11fc19 feat: add support for documentWithCaptionMessage in WhatsApp Baileys service
Modified whatsapp.baileys.service.ts to include handling for documentWithCaptionMessage. This change ensures that messages with documents having captions are properly processed, enhancing the service's message handling capabilities. No impact on existing functionalities.
2024-06-18 11:34:47 -03:00
Davidson Gomes
c060d330de fix: normalize event names in channel.service.ts
Normalized event names by replacing underscores with dots and converting to lowercase. This ensures consistent naming conventions and prevents potential issues with queue bindings.
2024-06-18 11:32:50 -03:00
Davidson Gomes
1e320f7904 fix: update use-multi-file-auth-state-db.ts to handle edge cases
Refactored the use-multi-file-auth-state-db.ts to better handle edge cases in multi-file authentication state management. This change improves reliability and ensures more robust error handling, reducing potential issues during authentication.
2024-06-17 11:19:22 -03:00
Davidson Gomes
975b3ee528 fix: reorder imports to resolve linting issues
Reordered imports in multiple files to resolve linting issues and improve code readability. This change does not impact the functionality but ensures the code adheres to the project's coding standards.
2024-06-16 17:19:45 -03:00
Davidson Gomes
5b47bc9ef0 feat: update dependencies and improve caching logic
Updated package.json to include latest dependencies. Enhanced caching logic in cache.service.ts and rediscache.ts for better performance. Improved DTOs in chat.dto.ts, instance.dto.ts, and sendMessage.dto.ts for more robust data handling. Refined instance.controller.ts and chatwoot.service.ts to streamline API integrations. Adjusted authentication state management in use-multi-file-auth-state-db.ts, use-multi-file-auth-state-provider-files.ts, and use-multi-file-auth-state-redis-db.ts. These changes aim to optimize the system's performance and reliability.
2024-06-16 17:17:55 -03:00
Davidson Gomes
053a7981d1 fix: update default values for WA_BUSINESS environment variables
Updated default values for WA_BUSINESS_TOKEN_WEBHOOK, WA_BUSINESS_URL, and WA_BUSINESS_VERSION in env.config.ts to 'evolution', 'https://graph.facebook.com', and 'v19.0' respectively. This change ensures that the application uses more appropriate defaults if environment variables are not set, improving reliability and consistency.
2024-06-13 18:51:18 -03:00
Davidson Gomes
5239e431c2 feat: update server and monitor services
Updated server.module.ts and monitor.service.ts to improve service initialization and monitoring logic. Modified main.ts to integrate changes. This enhances the application's performance and reliability.
2024-06-12 19:48:56 -03:00
Davidson Gomes
2a9412c81a chore: adjust socket configuration and update baileys version
Updated package.json to include the latest version of baileys for improved functionality. Modified whatsapp.baileys.service.ts to adjust socket configuration, enhancing the stability and performance of the service.
2024-06-12 19:02:36 -03:00
Davidson Gomes
1f817df5f6 fix: Correction of variables breaking lines in typebot 2024-06-08 21:27:58 -03:00
Davidson Gomes
8eced6c575 Merge branch 'develop' of github.com:EvolutionAPI/evolution-api into develop 2024-06-05 21:48:53 -03:00
Davidson Gomes
afcf6eab71 cacheGroupMetadata 2024-06-05 21:48:37 -03:00
Davidson Gomes
9633412ef6 cacheGroupMetadata 2024-06-05 21:39:33 -03:00
Davidson Gomes
8034e7f587 cacheGroupMetadata 2024-06-05 21:25:55 -03:00
Carlos Chinchilla
6371773416 fix: added validation when sending gif image 2024-06-04 15:14:02 -03:00
Davidson Gomes
52230edc5c session worker compatibility 2024-06-03 19:06:00 -03:00
Davidson Gomes
5b2a0fdcb1 Adjust to repository from session worker 2024-06-01 19:29:37 -03:00
Davidson Gomes
9354af3bc7 Adjust to repository from session worker 2024-06-01 19:20:59 -03:00
Davidson Gomes
f48f331d43 New method of saving sessions to a file using worker 2024-06-01 13:28:29 -03:00
Davidson Gomes
696261d749 New method of saving sessions to a file using worker 2024-06-01 09:54:56 -03:00
Davidson Gomes
3350cec589 fix: security fix in fetch instance with client key when not connected to mongodb 2024-05-27 16:35:55 -03:00
Davidson Gomes
097c09328f Merge pull request #615 from deivisonrpg/fix-merge-brazil-contacts
fix(chatwoot): add merge_brazil_contacts flag to ChannelStartupService and add logs
2024-05-27 15:34:56 -03:00
Davidson Gomes
732103292b Merge pull request #618 from edisoncm-ti/develop
fix: Correction to Postgres connection string in environment files
2024-05-27 15:34:29 -03:00
edisoncm-ti
3191e9b450 fix: Correction to Postgres connection string in environment files 2024-05-27 15:14:52 -03:00
Davidson Gomes
bf88fdbb31 fix: adjust send presence 2024-05-27 12:57:18 -03:00
Davidson Gomes
4c3fb5e762 correction in message formatting when generated by AI as markdown in typebot 2024-05-27 09:27:42 -03:00
Davidson Gomes
e4b6f4ff0d correction in message formatting when generated by AI as markdown in typebot 2024-05-27 09:23:53 -03:00
Deivison Lincoln
ca0b0d4602 Add merge_brazil_contacts flag to ChannelStartupService 2024-05-25 10:09:37 -03:00