4.70v

1. REST API and Bot Enhancements
   - Added retry options for REST API calls with configurable retry attempts and delays
   - Enhanced bot trigger validation to ensure buttons are correctly assigned to triggers
   - Improved trigger argument importing to support all available trigger arguments
   - Enhanced bot condition support with new "Not in list" condition type for more flexible logic flows
   - Better error handling and continuation logic when customers don't set matching triggers

2. File Management and Search Improvements
   - Enhanced file search functionality with new chat ID and user ID filters
   - Added display of attached files in chat modification view for better file visibility
   - Improved file search panel UI with better styling and user experience
   - Enhanced JavaScript for dynamic form submission on input changes
   - Implemented indefinite file download capability for better file access management

3. Forms and Offline Chat Integration
   - Major offline form tight integration (#2286) with React Component migration
   - Enhanced offline form to use React Components instead of legacy offline form system
   - Added conditions for offline form prefilling fields from previous chat sessions
   - Improved form error rendering for number field types
   - Better handling of input_data passing to offline templates
   - Enhanced forms integration with edge case scenario updates

4. Chat and Message Handling Improvements
   - Added support for image requests with visitor messages
   - Improved file attachment flow to prevent message overlapping during file uploads
   - Enhanced scroll positioning for file preview functionality
   - Better handling of visitor message display and file attachment rendering
   - Improved message object passing for enhanced chat functionality

5. Security and Permissions
   - Fixed permission handling issues (#2288, #2291)
   - Enhanced file verification events for attachment flows
   - Better access control and security validations throughout the system

6. UI and User Experience Enhancements
   - Enhanced file list module to support new search parameters
   - Improved styling of input fields for better user experience
   - Better JavaScript handling for dynamic form interactions
   - Enhanced chat modification interface with file display capabilities

7. System and Internal Improvements
   - Increased length of internal type fields for better data handling
   - Updated database structure with new field length requirements
   - Enhanced schedule checks with new ActionConditions class
   - Better chat blocking tests and validation logic

8. Technical Infrastructure
   - Updated widget React components for better offline form handling
   - Enhanced translation system and updated translation files

execute doc/update_db/update_338.sql for update

4.69v

1. File and Image Preview System Enhancement
   - Implemented comprehensive file and image preview functionality before sending to operator
   - Added temporary file handling with new `tmp` field in `lh_chat_file` table
   - Enhanced widget React components to support file preview with better user experience
   - File attachments are now rendered at the top of messages for better visibility
   - Improved file upload workflow with progress indicators and preview capabilities
   - This enhancement prepares the foundation for future OpenAI Responses API for images implementation

2. Widget and Chat Interface Improvements
   - Enhanced attachment rendering system with dedicated top-level templates
   - Improved AI-generated content checks and validation
   - Better file uploader component with enhanced preview functionality
   - Optimized widget React components for better performance and user experience
   - Enhanced chat file handling with improved meta message rendering

3. Department and Chat Management Enhancements
   - Added support for using department alias when provided in chat widget and status checks
   - Improved department handling logic for better chat routing
   - Enhanced chat widget functionality with streamlined department selection

4. Export and Data Handling Improvements
   - Fixed JSON export formatting with proper UTF-8 charset headers for Unicode support and pretty printing (#2283)
   - Enhanced bot export functionality with correct content-type headers
   - Improved REST API export with proper encoding
   - Better theme export handling with Unicode support

5. File Configuration and Management
   - Added new file configuration options for better file handling control
   - Enhanced file upload settings with improved validation and processing
   - Better integration between file upload API and widget components
   - Improved file metadata handling and storage

6. Technical Infrastructure Improvements
   - Updated database structure with new temporary file handling capabilities
   - Enhanced widget REST API endpoints for better file and chat management
   - Improved translation support and internationalization

7. User Experience Enhancements
   - Streamlined file attachment workflow with instant preview
   - Better visual feedback for file operations
   - Enhanced message rendering with improved attachment display
   - Optimized loading and rendering performance for file-heavy conversations

execute doc/update_db/update_337.sql for update

4.68v

1. Mail module enhancements
   - Added comprehensive mail file management system with listing, viewing, and searching functionalities
   - Enhanced mail image verification flow with protection mechanisms and sensitive content handling
   - New components: MailChatAttachment and MailChatImage for better mail attachment handling
   - Mail files archive tables now maintain consistent structure
   - Improved file details display in mail history
   - Better handling of mail file verification and download permissions

2. User management improvements
   - Added job title field to user department alias functionality
   - Enhanced user department attributes with additional customization options
   - Improved validation and structure for user department relationships

3. BBCode and URL handling enhancements
   - Added URL whitelist functionality for BBCode configuration to control link visibility
   - Enhanced URL obfuscation in BBCode parser with whitelist support
   - Improved BBCode URL handling and file extraction in messages
   - Added Message class for better file extraction functionality
   - Enhanced security and user control over link visibility

4. File and image handling improvements
   - New permission system for file verification with granular access control
   - Allow non-image files to download with proper verification
   - Enhanced file reveal functionality and logging capabilities
   - Improved image attributes display in file edit window
   - Better styling for reveal image actions

5. Mail search and performance optimizations
   - Enhanced mail search using message_id for improved performance
   - Better handling of mail file operations and verification flow
   - Optimized database queries for mail-related operations

6. System configuration enhancements
   - Added default system time zone variable for better timezone handling
   - Option to see SMTP debug information for troubleshooting
   - Enhanced SMTP settings form and tab navigation
   - Improved audit configuration and logging capabilities

7. Security and data handling
   - Fixed JSON export formatting with Unicode support and pretty printing (#2283)
   - Enhanced security for file downloads and verification
   - Better handling of sensitive information in mail attachments
   - Improved agent name escaping in various contexts

8. Performance and stability improvements
   - Combined department and department group results for better consistency
   - Merged department ID filters for improved data consistency in statistics retrieval
   - Enhanced message handling logic in fetch operations
   - React app version updates and script reference adjustments
   - Better content fetching and caching mechanisms

9. UI and UX improvements
   - Enhanced file body parsing and embed functionality for chat files
   - Improved styling and visual feedback for various components
   - Better handling of verification states and user interactions
   - Enhanced modal windows and form interactions

10. Developer and debugging improvements
    - Option to skip request body in logging for performance
    - Enhanced debugging capabilities with better logging options
    - Improved database structure documentation and references
    - Better error handling and validation throughout the system

execute doc/update_db/update_336.sql for update

4.67v

1. Image download verification and protection features
   - Introduced 'img_download_policy' configuration option to manage image download permissions
   - Enhanced file download logic to include image verification and protection checks
   - Added new verifyaccess.php module to handle image access verification requests
   - Updated database schema to include 'meta_msg', 'width', and 'height' fields in lh_chat_file and lh_mailconv_file tables
   - Implemented Svelte component for image handling with verification and protection features
   - Added translations for image access verification messages
   - Updated module.php to include new permissions for downloading verified and unverified files
   - Added sensitive information image to the default theme
2. Chat tabs and dashboard improvements
   - Chat tabs React component now supports custom attributes for styling
   - Enhanced tabs flow with better navigation and user experience
   - Dashboard chat tabs improvements with better state management
3. Bot and webhook enhancements
   - Added support for overriding bot ID in webhook processing for better event handling
   - Implemented chat file variable handling in generic bot action command for dynamic variable updates
   - Enhanced REST API action to support chat file messages
   - Option to sync attribute from database in bot conditions
   - Modal window will show error message when trying to delete a bot that cannot be deleted
4. Form and file handling improvements
   - Fixed reCAPTCHA in offline form when file is submitted
   - Enhanced offline forms with proper cookie handling and headers
   - Better file upload handling with proper content headers
   - Store partial encoded data for better file processing
5. Chat experience enhancements
   - Hide "Switch to Human" button when chat transitions to survey mode
   - System message is now logged when "Switch to Human" button is clicked
   - Custom template support for extensions below chat messages
   - Improved image reveal logic in Svelte components for better scrolling behavior
6. Security and compatibility
   - Fixed deprecated PHP constant E_STRICT for better PHP 8+ compatibility
   - Enhanced file download verification process with user data in event dispatch
   - Improved security for image access and verification
7. UI and UX improvements
   - Better error handling and user feedback
   - Enhanced modal dialogs and confirmation windows
   - Improved responsive design elements
   - Updated sponsors section

execute doc/update_db/update_335.sql for update

4.66v

1. IMAP and SMTP connection testing features in mailbox settings. You can now test your mail configuration directly from the interface.
2. Enhanced mailbox management with delete folder functionality for better organization.
3. Bot chart generation using Mermaid diagrams for visual workflow representation of bot flows.
4. New configuration option for departments: "Do not transfer to destination department if it has no online operators" to improve chat transfer handling.
5. Enhanced user settings management and dashboard tab management with improved visibility options.
6. Conditions support for replaceable variables, allowing more dynamic content generation.
7. Option to investigate use cases of various objects for better debugging and analysis.
8. Priority rule testing - you can now test priority rules directly from the interface.
9. Enhanced bot message handling and trigger management with better control options.
10. Direct magic attribute support in bot text fields with new `direct_` prefix option.
11. Enhanced REST API trigger execution logging and handling for better debugging.
12. Option to suspend/resume online visitors updating in main window for performance control.
13. Canned messages now have max result configuration for display optimization.
14. Enhanced email anonymization features and chat status improvements.
15. n8n integration support for workflow automation.
16. Improved quote handling in messages - quotes will be preserved as plain text.
17. Enhanced access control for displaying user attributes in online user info.
18. Better handling of chat continuation and message rendering.
19. Updated dependencies including TinyMCE, Svelte, and other packages for security and performance.
20. Switch to new modal confirm windows replacing browser native confirms.
21. Enhanced character validation and node identifiers in bot chart generation.
22. Improved debug output with better state attribute handling and clarity.
23. Enhanced bot trigger builder functionality with better workflow management.
24. Fixed chat closing in popup scenarios that sometimes triggered false alerts.
25. Better handling of button payload text values as default triggers.
26. Enhanced message processing with improved direct value handling.
27. Various fixes for online operator department conditions and user management.
28. Pronoun inclusivity improvements changing he/him/his references to they/them.
29. Enhanced template compilation with preserved newline characters.
30. Better background worker exception handling.
31. Enhanced department query to include online hours check for better availability management.
32. React app version updates and chat widget reducer state management improvements.

execute doc/update_db/update_334.sql for update