Commit Graph

1254 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
Davidson Gomes
78150d0fc6
Merge pull request #1489 from gomessguii/v1.8
fix: Update message model and enhance media handling in Baileys service
2025-05-22 16:51:39 -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
2d9ca15d74 docs(changelog): Update CHANGELOG.md 2025-05-12 12:48:52 -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
b36c37bf33 version: 1.8.5 2025-02-03 12:32:36 -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
b6506dc661 chore: Update Baileys dependency to a new GitHub repository
- Changed the Baileys dependency in package.json from the EvolutionAPI repository to the renatoiub repository.

This update ensures that the project uses the latest version of Baileys from the specified GitHub source.
2025-01-17 15:46:55 -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
Davidson Gomes
ebd70fe454
Merge pull request #753 from raimartinsb/develop
fix: Correction of media as attachments in chatwoot when using a Meta API Instance and not Baileys
2024-08-12 13:22:12 -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
293f6a39c5 chore: Update changelog with fixed issues and maintain compatibility
- Updated CHANGELOG.md with fixed issues in version 1.8.3
- Fixed issue sending group messages when ignore groups enabled
- Fixed groups\_ignore in /instance/create and maintained compatibility
2024-07-12 18:29:35 -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
Davidson Gomes
1d81c79fe6
Merge pull request #682 from jtapeg/fix-groups-ignore
Fix: groups_ignore in /instance/create and maintaining compatibility
2024-07-12 13:59:20 -03:00
Joao Pedro
c55885b366 Fix: groups_ignore in /instance/create and maintaining compatibility 2024-07-06 21:59:41 -03:00
Davidson Gomes
549ecd8801
Merge pull request #676 from EvolutionAPI/DavidsonGomes-patch-2
Update publish_docker_image_v2.yml
2024-07-03 19:17:56 -03:00
Davidson Gomes
5c6b70f372
Update publish_docker_image_v2.yml 2024-07-03 19:17:47 -03:00
Davidson Gomes
418ca971fa
Merge pull request #675 from EvolutionAPI/DavidsonGomes-patch-1
Update publish_docker_image_v2.yml
2024-07-03 18:04:24 -03:00
Davidson Gomes
3d6209618b
Update publish_docker_image_v2.yml 2024-07-03 18:04:01 -03:00
Davidson Gomes
05eb58be0e Merge tag '1.8.2' into develop
* Corretion in globall rabbitmq queue name
* Improvement in the use of mongodb database for credentials
* Fixed base64 in webhook for documentWithCaption
* Fixed Generate pairing code
2024-07-03 16:10:42 -03:00
Davidson Gomes
b8fe5603fd Merge branch 'release/1.8.2' 2024-07-03 16:10:38 -03:00
Davidson Gomes
762453c0e3 chore: Add workflow to publish Docker image
A new untracked file '.github/workflows/publish\_docker\_image\_latest.yml' was added. This workflow will handle the process of publishing the latest Docker image. This change allows for easier and more automated deployment of the Node.js project.
2024-07-03 16:10:23 -03:00
Davidson Gomes
af1b5caa29 Merge tag '1.8.2' into develop
* Corretion in globall rabbitmq queue name
* Improvement in the use of mongodb database for credentials
* Fixed base64 in webhook for documentWithCaption
* Fixed Generate pairing code
2024-07-03 16:09:25 -03:00
Davidson Gomes
50b3379d88 Merge branch 'release/1.8.2' 2024-07-03 16:09:17 -03:00
Davidson Gomes
c9ac5984ec Merge tag '1.8.2' into develop
* Corretion in globall rabbitmq queue name
* Improvement in the use of mongodb database for credentials
* Fixed base64 in webhook for documentWithCaption
* Fixed Generate pairing code
2024-07-03 16:06:24 -03:00
Davidson Gomes
29ba63d621 Merge branch 'release/1.8.2' 2024-07-03 16:06:16 -03:00
Davidson Gomes
2ce64af502 Merge tag '1.8.2' into develop
* Corretion in globall rabbitmq queue name
* Improvement in the use of mongodb database for credentials
* Fixed base64 in webhook for documentWithCaption
* Fixed Generate pairing code
2024-07-03 13:51:36 -03:00
Davidson Gomes
28c517a3d5 Merge branch 'release/1.8.2' 2024-07-03 13:51:28 -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
0f7a39a08f chore(changelog): Update changelog to v1.8.2
This commit updates the changelog to reflect the release of version 1.8.2. The date of the release has been updated in the header of the changelog. No functional changes were made in this release.

Modified: CHANGELOG.md
2024-07-03 13:50:30 -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