For update just follow standard update procedure. For manual update it's update_359.sql
**Full Changelog**: https://github.com/LiveHelperChat/livehelperchat/compare/4.92v...4.93v
## What's Changed
Related video manual about MCP setup - https://www.youtube.com/watch?v=PfcDh0JekIk
1. Notable changes since 4.91v
- AI MCP server: added a Model Context Protocol endpoint so external AI clients (ChatGPT custom connectors, Claude, and other MCP hosts) can inspect a Live Helper Chat installation; the endpoint `aimcp/mcp` speaks Streamable HTTP through the official `mcp/sdk` PHP SDK and is a thin bridge that only authenticates the caller and forwards the request, while the protocol itself (handshake, protocol revisions, sessions, `tools/list`, `tools/call`, JSON-RPC framing, CORS) is handled by the SDK; a new "MCP Setup" screen (`aimcp/key`, linked from the Rest API page and protected by the new `lhaimcp`/`use` permission) stores the server name and the access token, shows the endpoint URL and the list of exposed tools read directly from the tool attributes so the page cannot drift from `tools/list`; the endpoint stays disabled until a token is generated and accepts it either as an `Authorization: Bearer <token>` header or as a `?token=` parameter (a generated token uses `random_bytes` and comparisons use `hash_equals`), and allowed CORS origins plus an optional host allowlist for the SDK DNS rebinding protection can be configured through the `ai_mcp_options` chat configuration.
- MCP tools and helpers: eight read-only tools are exposed - `get_user_id_by_email`, `get_user_id_by_username`, `get_user_permissions`, `get_url_permissions`, `check_user_object_access`, `explain_chat_access`, `get_department_auto_assign_settings` and `explain_chat_auto_assign`; `LiveHelperChat\Mcp\Access` resolves a back office URL into module/view and the permissions it requires with the same logic as the permission explorer (absolute URL, plain path, with/without `index.php`, with/without siteaccess) and evaluates permissions grouped so that checks in the same group are OR-ed and different groups are AND-ed; `LiveHelperChat\Mcp\Rules` diagnoses object level access for departments, users, chats and canned message replace variables, reporting only identifiers, booleans and generic placeholders (no names, e-mail addresses, chat nicks or message bodies) and can be extended by extensions with the new `ai_mcp.object_access_rules` event; `LiveHelperChat\Mcp\AutoAssign` is a read-only port of `erLhcoreClassChatWorkflow::autoAssign()` which replays the candidate and gate checks without any write or lock, so it can be run safely against a live installation to answer "would chat X be auto assigned?" or "why was operator Y not auto assigned to chat X?".
- MCP sessions and dependencies: handshake sessions are stored in the new `lh_mcp_session` table instead of per-request or per-node state, so the endpoint also works on load balanced installations; sessions expire one hour after the last write (the SDK default), a failing query is reported as a missing session instead of turning the endpoint into a PHP error page, and expired sessions are purged by the regular chat cleanup cron so the table stays small; `composer.json` gained the `mcp/sdk` and `symfony/finder` dependencies, `erLhcoreClassSystem::$QueryString` is now a declared property, `ezcUrl::parsePathElement()` no longer warns when a path element is `null`, and the new table is created by the regular database update.
- Audit log size protection: audit records larger than the MySQL `max_allowed_packet` no longer break the operation being logged - oversized audit messages are truncated to a safe size (16 MB minus a 1 MB reserve for the rest of the query) with UTF-8 safe truncation and a marker showing the original size, and a failing log write is reported through `error_log()` instead of propagating up, unless `debug_output` is enabled so developers still see the error.
- Chat transfer to human: `chat/transfertohuman` now runs inside a database transaction, loads the chat with `fetchAndLock()` and locks the department before changing the state, re-validates the chat hash and status after the lock was acquired, and returns a JSON error instead of failing when the chat does not exist or was closed/transferred in the meantime; a missing chat is also handled safely when grouping canned message items, and incomplete canned message replace conditions (missing field, comparator or value) are skipped instead of raising warnings.
- Assignment and SQL mode fixes: editing a department operator assignment returns "Assignment record was not found" instead of failing when the assignment record is missing; aggregate queries in the department operator lists (operators, operators group) and in collected survey results set `sql_mode=''` so installations with `ONLY_FULL_GROUP_BY` enabled can still list operators and survey results; the operator assignment priority field gained an explanation that it is only taken into account when the department enables assignment by operator priority, otherwise auto-assignment sorts by lowest workload / least recently accepted first.
- Bot: the "Update message" bot command can now update the `del_st` (deleted status) field of a message, and the bot workflow translation/replace helper guards against a non-object chat.
- Widget and operator profile: relative URIs in chat responses are treated as same site links, so they open inside the embedded chat instead of a new browser window; send button and in-progress icons received small padding and alignment fixes; new `--lhc-message-spacing` and `--lhc-message-group-spacing` CSS variables let a theme control the spacing between message bubbles and between message groups without overriding the whole stylesheet; the "job title in new row" theme option is now implemented with CSS classes (`op-job-title-sep`, `operator-profile-content`, `op-photo`) instead of duplicated template markup; the widget React app version was bumped.
- Miscellaneous: updated install scripts, `structure.json` and `db.dbml` for the new `lh_mcp_session` table; bumped version to 4.92v.
2. Summary
- This release focuses on AI tooling for administrators, plus reliability and compatibility fixes.
- A Model Context Protocol endpoint lets AI clients read permission, access and auto-assignment information from an installation through eight read-only tools, protected by an access token and a dedicated `lhaimcp`/`use` permission.
- MCP sessions live in the new `lh_mcp_session` table, making the endpoint safe for load balanced setups, with automatic expiry and cleanup.
- Oversized audit records are truncated instead of breaking the logged operation, and a failing log write no longer interrupts the request flow.
- Chat transfer to human, department assignments and SQL mode sensitive queries are hardened, and incomplete canned message replace conditions are handled safely.
- Widget links, message spacing and operator profile job titles were polished.
For update just follow standard update procedure. For manual update it's update_358.sql
* Treat relative ur is as same site in chat responses by @niels-heinemann in https://github.com/LiveHelperChat/livehelperchat/pull/2410
* Allow self-signed and unverified SSL certificates in Mailconv SMTP transport by @mysubcult in https://github.com/LiveHelperChat/livehelperchat/pull/2413
**Full Changelog**: https://github.com/LiveHelperChat/livehelperchat/compare/4.91v...4.92v
1. Notable changes since 4.90v
- Chat widget CAPTCHA providers: added Google reCAPTCHA v3 and Cloudflare Turnstile support for verifying chat widget visitors through provider-based CAPTCHA validation; CAPTCHA settings gained a chat-specific enable flag and a configurable reCAPTCHA v3 score threshold; a dedicated widget CAPTCHA helper loads the provider script and resolves the token, which is now sent and verified as part of the widget online chat submission; the CAPTCHA settings screen gained a provider toggle and CAPTCHA settings are exposed through the widget online settings endpoint.
- Canned message replaceable variables: added a `configuration` field to `lh_canned_msg_replace` storing per-variable JSON options to hide the variable value from the replaceable variables list ("Hide value in list") and to restrict management of the variable to operators holding the new `use_replace_sensitive` permission of the `lhcannedmsg` module ("Restricted access"); restricted variables show a "Restricted" badge, their value and clone/edit/delete actions are hidden from operators without the permission, and access control is enforced in the clone, edit and delete handlers.
- Exact counts for chat and mail searches: the chat and mail conversation search panels gained an "Exact count" toggle; by default the result total is capped by counting only the first 1,000 matching rows through new `limit_count` support in `getCount()`, avoiding slow full-table scans on large result sets, and the paginator shows an approximate total ("~") whenever the count was capped; enabling "Exact count" performs a precise count of every matching row.
- Bot REST API actions: authentication credentials used for NTLM, Bearer token and API key (header and query parameter) requests now resolve through replaceable variables; authorization headers are masked in debug logs by shortening them from both sides so secrets are not exposed; new user language dynamic variables (`{{user_locale}}`, `{{user_site_access}}`, `{{user_content_language}}`, `{{user_content_language_name}}`) were added for REST API bot actions, backed by a new `user_language` magic property on the chat model; streaming requests gained a configurable row start pattern so response streams that do not use the SSE `data: {` prefix are parsed correctly.
- Bot trigger arguments: invisible message arguments (`{message_invisible_N}`) passed from the widget are now consistently forwarded to every trigger execution path, including theme-based bot trigger execution and the default trigger, by centralizing trigger argument processing early in the widget online submission flow.
- Offline reasons for operators: the offline reasons feature now supports operator access control through a new `offlinereasons_operator` permission that can be granted with limitations restricting operators to specific reasons; the status (online/offline) modal shows a reason selector when an operator goes offline and stores the selection as `offline_reason_id`, and only the reasons an operator is allowed to use are exposed in the dashboard and status modal; the permission editor and "who grants" summary show the offline-reason limitation, specific function limitations are now respected over wildcard grants, and offline reasons can be deleted.
- Statistics averages: agent statistics averages now include the full result set instead of trimming the highest and lowest ten percent, and preserve fractional values when computing the averages.
- Security hardening: file downloads in incoming webhooks and online-user avatar fetching were hardened against SSRF - only HTTP/HTTPS URLs are accepted, `localhost` and private/reserved IP addresses are rejected, the resolved hostname is pinned to a validated IP to prevent DNS rebinding, and redirect following is disabled; message validation and the message preview modal were fixed.
- Reliability: the bot "Close chat" command now runs inside a database transaction with row locking to prevent race conditions and partial state updates during chat closure; the mail conversation fetch API returns an error instead of failing fatally when the conversation cannot be found; mailbox syncing now limits SQL statement execution and lock-wait time and sets IMAP open/read/write/close timeouts so a slow mail server cannot stall the sync process.
- Message masking test tool: added a chat-context simulation mode where a chat and a test message are supplied and the tool reproduces the real widget masking flow with step-by-step diagnostics (chat found, guardrails enabled, chat assigned to operator, matching masking rule, operator permission, masking result) using the chat's department, assigned operator and permissions, along with clearer explanations.
- Miscellaneous: added RAR and other MIME type detection for downloaded webhook attachments; added Latvian (`lv_LV`) and Estonian (`et_EE`) translations and updated the translation update script; widened the widget theme custom CSS fields from `text` to `mediumtext` to prevent CSS truncation; updated install scripts and database structure definitions; bumped version to 4.91v.
2. Summary
- This release focuses on safeguarding sensitive data, richer chat widget CAPTCHA options, and performance tuning for large searches.
- Chat widget visitors can now be verified with Google reCAPTCHA v3 or Cloudflare Turnstile, controlled by a chat-specific CAPTCHA switch and a configurable score threshold.
- Canned message replaceable variables can hide their values from lists and be locked down to operators with a dedicated permission.
- Chat and mail searches gain an "Exact count" option while default counts are capped and marked approximate for large result sets.
- Bot REST API actions support variable-based authentication with masked secrets, user language variables, and flexible streaming row parsing, and invisible message arguments now reach all trigger workflows.
- Offline reasons become permission-controlled, file downloads are hardened against SSRF, and mail fetching, chat closing, statistics averaging and translation coverage were improved.
For update just follow standard update procedure. For manual update it's update_357.sql
**Full Changelog**: https://github.com/LiveHelperChat/livehelperchat/compare/4.90v...4.91v
For update just follow standard update procedure. For manual update it's update_355.sql, update_356.sql
**Full Changelog**: https://github.com/LiveHelperChat/livehelperchat/compare/4.88v...4.90v
4.88v
1. Notable changes since 4.87v
- Offline reasons: introduced configurable offline reasons with the new `lh_abstract_offline_reason` model and CRUD interface; operators can select a reason (e.g. "Lunch", "Meeting") with an icon when setting themselves offline, persisted on `lh_users` and `lh_users_online_session`; offline reasons are displayed in online-hours statistics and user-box menus with a redesigned status control layout; a new `offlinereasons` permission controls access to this feature.
- Forms module overhaul: added comprehensive search and filtering for collected forms, including department filter, chat operator filter, date range, creator filter, and chat-time search; introduced field change tracking for internal forms — when an operator edits a previously submitted form, field history (old/new values and modifier) is logged; added translation support and improved template variable management for forms; refactored module navigation with proper permission checks and removed deprecated index page; enhanced embed code generation with access control; clearing chat attributes when deleting collected form data now properly reverts associated chat variables and additional data entries.
- Bot enhancements: added secondary translations group support for bots, allowing an optional second translations group in bot configuration with proper validation and item retrieval from both groups; added "Trigger on bot skip" option to proactive invitations, executing triggers when a visitor skips the bot; fixed missing `last_msg_id` update after sending invitation messages.
- Security hardening: refactored CAPTCHA to use browser fingerprinting (combining multiple HTTP headers) and SHA-256 hashing for improved security across chat validation, FAQ, voting, and widget modules; added more detailed CAPTCHA error messages; added `ignoreactivityglobal` permission allowing individual users to opt out of activity tracking; replaced redirect with proper permission-denied page for abstract list views; added `from_address` emptiness check to prevent mailbox sync failures on null sender addresses.
- Performance and stability: improved MySQL reconnect logic by removing stale connection caching and properly resetting reconnect counters; guarded compiled config caching behind database connection checks to prevent warmup/CLI failures; wrapped `setinactive.php` in a transaction with row locking and added `syncAndLock()` to `setoffline.php` to prevent race conditions on online status updates; added `resetSession()` methods across persistent session helpers for clearing cached ezcPersistentSession instances; added server info panel showing address, name, port, software, and uptime in audit configuration.
- Admin custom fields: refactored processing to prevent duplicate field values by moving admin fields after JS variable processing and tracking processed identifiers; admin custom fields with `uempty` show condition are now hidden from returning visitors who already have a non-default nickname set; added support for original author re-modifying fields.
- UI and UX: updated Bootstrap badge classes from v4 to v5 (`badge-*` to `bg-*`) across GroupChat, operators template, and mailing import templates; improved assignment configuration UX; translated theme before survey rendering in `fill` and `fillwidget` modules; adjusted naming for less confusion; added server and user timestamps to audit config and login pages.
- Miscellaneous: fixed #2400; added support for BOM UTF format files; added avatar caching; added search attribute support for extensions; fixed installer config validation with clearer error messages; refactored `addmsgadmin.php` input validation to handle missing input gracefully; handled edge database reconnect cases; fixed CAPTCHA time drift validation; ensured dynamic property support.
2. Summary
- This release introduces a major new feature — configurable offline reasons — allowing operators to specify why they are offline with visual indicators across the UI and statistics.
- The forms module receives a comprehensive upgrade with advanced search/filtering, field change tracking, translation support, and improved permission handling.
- Bot capabilities expand with secondary translations groups and trigger-on-skip functionality.
- Security is strengthened through CAPTCHA fingerprinting, SHA-256 hashing, and multiple permission/validation improvements.
- Performance and stability are enhanced with improved MySQL reconnect handling, race condition fixes, and guarded config caching.
For update just follow standard update procedure. For manual update it's update_354.sql
**Full Changelog**: https://github.com/LiveHelperChat/livehelperchat/compare/4.87v...4.88v