- 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.
- Added a new utility function `fetchLatestWaWebVersion` to retrieve the latest WhatsApp Web version.
- Updated the Baileys service and router to utilize the new function instead of the deprecated `fetchLatestBaileysVersion`, ensuring accurate version information is fetched for WhatsApp integration.
- This change enhances the reliability of version management in the application.
- Updated the .env.example file to comment out the CONFIG_SESSION_PHONE_VERSION variable, indicating it is not currently set. This change helps clarify the configuration options available for users.
- Modified the root route to fetch the latest WhatsApp web version from Baileys if not set in the environment configuration.
- This enhancement ensures that clients receive the most up-to-date version information in the API response.
- Introduced a new optional `lid` field in the IsOnWhatsapp model to enhance data tracking.
- Updated migration script to add the `lid` column to the database.
- Modified OnWhatsAppDto to include the `lid` property for better integration with WhatsApp user data.
- Enhanced the WhatsApp Baileys service to handle `lid` numbers separately and improve user verification logic.
- Updated cache handling functions to support the new `lid` field for consistent data management.
- 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.
- 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.
- Included `whatsappWebVersion` in the response object to provide the version of the WhatsApp web session from the environment configuration.
- This addition enhances the API's response with relevant session information for clients.
- Updated the token retrieval in the BusinessStartupService to use a class property instead of a hardcoded environment variable.
- This change enhances flexibility and maintainability of the service configuration.
- Updated media message preparation to conditionally include filename and caption based on media type.
- Improved error handling in media ID retrieval and audio processing methods.
- Refactored audio processing to support file uploads and URL handling more effectively.
- Enhanced logging for better error tracking during media operations.
- Introduced `splitMessages` and `timePerChar` fields in the Typebot and TypebotSetting models with default values.
- Created a migration script to update the database schema accordingly.
- Updated audio message handling to prepend `[audio]` to transcriptions for better clarity in message context.
- 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.
- 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.
- Added null checks for conversation object in reopenConversation mode and when finding unresolved conversations.
- Improved logging for better debugging of conversation retrieval.
This commit updates several dependencies in the package-lock.json and package.json files to their latest versions. Key changes include:
- Upgraded various @typescript-eslint packages to version 8.33.0, ensuring compatibility and access to the latest features and fixes.
- Updated the baileys package from version 6.7.17 to 6.7.18, incorporating the latest improvements.
- Bumped the pino package version from 9.6.0 to 9.7.0 for enhanced performance and stability.
- Updated the process-warning package from version 4.0.1 to 5.0.0, which may include important updates and fixes.
- Adjusted the protobufjs package version from 7.5.2 to 7.4.0, reflecting the latest changes.
These updates contribute to improved performance, security, and maintainability of the codebase.
This commit refines the EvolutionBot integration by reordering constructor parameters for consistency and removing unused properties from the EvolutionBotDto and EvolutionBotSettingDto classes. Key changes include:
- Adjusted the parameter order in the EvolutionBotService constructor for improved clarity.
- Streamlined the EvolutionBotDto and EvolutionBotSettingDto by eliminating unnecessary fields.
These updates enhance the maintainability and readability of the EvolutionBot integration.
- Add YAML file loader to tsup.config.ts to fix build compilation errors
- Fix OpenAI speechToText method signature across all chatbot services
- Correct DifyService constructor parameter order in server.module.ts and channel.service.ts
- Add missing OpenAI service dependency injection to EvoaiService
- Standardize audio transcription logic in FlowiseService to match N8N implementation
- Fix speechToText calls in WhatsApp Baileys and Evolution channel services
- Ensure consistent error handling and parameter passing for audio processing
This resolves the "Cannot read properties of undefined" errors and ensures
all chatbot integrations (OpenAI, N8N, Flowise, EvoAI, Dify, EvolutionBot)
properly handle audio message transcription using OpenAI Whisper.
This commit updates the asset references in the index.html file to point to new CSS and JS files. Key changes include:
- Replaced the old JavaScript file `index-mxi8bQ4k.js` with `index-D-oOjDYe.js`.
- Updated the CSS file reference from `index-DNOCacL_.css` to the new `index-CXH2BdD4.css`.
- Removed the old CSS and JS files to clean up the codebase.
These updates ensure that the application uses the latest styles and scripts, contributing to improved performance and maintainability.
This commit refines the Flowise and Typebot integrations by simplifying the integration enablement checks in their respective controllers. Key changes include:
- Consolidated the integration checks in the createBot method of FlowiseController and startBot method of TypebotController for improved readability.
- Removed unnecessary line breaks to enhance code clarity.
These updates contribute to a cleaner and more maintainable codebase for chatbot integrations.
This commit refines the Dify integration by updating the controller and service logic for better functionality and maintainability. Key changes include:
- Added Dify-specific validation in the createBot method to prevent duplicate entries.
- Simplified comments for clarity and removed unused methods in DifyController.
- Enhanced message processing in DifyService to handle audio messages more effectively and improve error handling.
- Updated DifyDto and DifySettingDto to streamline properties and improve clarity.
These updates contribute to a more robust and maintainable Dify integration.
This commit refines the Evoai integration by updating the service and controller logic for better functionality and maintainability. Key changes include:
- Added the `openaiService` as a parameter in the EvoaiService constructor for improved dependency management.
- Enhanced the createBot method in EvoaiController to include EvoAI-specific validation and duplicate checks.
- Updated EvoaiDto and EvoaiSettingDto to remove unnecessary comments and add a fallback property.
- Refined the message processing logic in EvoaiService to handle audio messages more effectively and improve logging clarity.
- Adjusted the schema for Evoai settings to rename `evoaiIdFallback` to `botIdFallback` for better clarity.
These updates contribute to a more robust and maintainable Evoai integration.
This commit refines the Flowise integration by enhancing configuration management and validation logic. Key changes include:
- Reordered parameters in the FlowiseService constructor for consistency.
- Updated FlowiseController to utilize the configService for integration enablement checks.
- Simplified FlowiseDto and FlowiseSettingDto by removing unused properties.
- Enhanced validation logic in flowise.schema.ts to include new fields.
- Improved error handling in the createBot method to prevent duplicate entries.
These updates contribute to a more robust and maintainable Flowise integration.
This commit enhances the N8n integration by refining session management and validation logic. Key changes include:
- Added error handling for session creation failures in the BaseChatbotService.
- Removed unused methods and properties in N8nService and N8nDto to streamline the codebase.
- Updated N8n schema to enforce required fields and improve validation checks.
- Simplified message processing logic to utilize base class methods, enhancing maintainability.
These improvements contribute to a more robust and efficient N8n integration.
This commit refactors the OpenAIController and OpenAIService to improve credential handling and error management. Key changes include:
- Added checks to prevent duplicate API keys and names during bot creation.
- Updated the getModels method to accept an optional credential ID for more flexible credential usage.
- Enhanced error handling with specific BadRequestException messages for better clarity.
- Removed unused methods and streamlined the speech-to-text functionality to utilize instance-specific settings.
These improvements enhance the maintainability and usability of the OpenAI integration.
This commit refactors the TypebotController and TypebotService to streamline the processTypebot method, aligning it with the base class pattern. It reduces complexity by consolidating parameters and improving readability. Additionally, it updates the TypebotDto and TypebotSettingDto to remove unused properties, enhancing code clarity and maintainability.
Updates the minimum frame_max value from 4096 to 8192 to meet the requirements
of RabbitMQ 4.1+ servers. This resolves connection failures with newer RabbitMQ
versions while maintaining backwards compatibility with older versions.
This commit modifies the logging messages in the `EvoaiService` to use the correct service name "EvoAI" instead of "Dify" for better clarity. Additionally, it refines the message handling logic by changing the way message IDs are generated and updating the payload structure sent to the API. The extraction of the message from the response artifacts has also been improved to ensure that the correct message is retrieved from the response data.
Changes include:
- Updated logging statements to reflect the correct service name.
- Changed the message ID generation to use a shorter UUID substring.
- Adjusted the payload structure to include `contextId` and `messageId`.
- Enhanced message extraction logic from the response artifacts.
These changes enhance the clarity of logs and improve the robustness of message handling in the service.
This commit removes the unused `Auth` import from both `dify.service.ts` and `n8n.service.ts`. This change helps to clean up the code and improve readability by eliminating unnecessary dependencies.