- Added logic to restart the WebSocket connection in `ChannelStartupService` when a valid `wavoipToken` is set, ensuring the client reconnects with updated settings.
- 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.
- 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.
- 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.
- 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.
- 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.
- Switched Baileys dependency to EvolutionAPI repository
- Re-enabled delInstanceTime and deleteTempInstances methods in monitoring services
- Updated CHANGELOG.md to version 1.8.5
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
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
* 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
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.
* 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
* 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
* 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
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.
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
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.
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
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.
Normalized event names by replacing underscores with dots and converting to lowercase. This ensures consistent naming conventions and prevents potential issues with queue bindings.
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.
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.
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.
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.