From b6dfa3799d19315f416da0b66b0e723277cc0e84 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Wed, 30 Sep 2026 17:05:45 +0200 Subject: [PATCH] fix: chat links in finished and failed webhook notifications open a 404 (#31572) The link in "chat finished" and "chat failed" webhook notifications was missing the `/c/` part of the chat address, so clicking it opened a 404 page. The link is sent as `/c/` again and opens the chat. Fixes #31565 --- backend/open_webui/utils/notifications.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/backend/open_webui/utils/notifications.py b/backend/open_webui/utils/notifications.py index 8b6f090b4c..a35ad9b88f 100644 --- a/backend/open_webui/utils/notifications.py +++ b/backend/open_webui/utils/notifications.py @@ -268,9 +268,6 @@ def _notification_webhook_content(event: Any) -> tuple[str, str, dict[str, Any], title = str(data.get('title') or event.message or 'Chat finished') content = str(data.get('message') or '') url = str(data.get('url') or '') - chat_id = str(data.get('chat_id') or '') - if chat_id and url.endswith(f'/c/{chat_id}'): - url = f'{url[: -len(f"/c/{chat_id}")].rstrip("/")}/{chat_id}' body = '\n'.join(part for part in (content, url) if part) return ( f'**{title}**', @@ -288,9 +285,6 @@ def _notification_webhook_content(event: Any) -> tuple[str, str, dict[str, Any], title = str(event.message or 'Chat failed') content = str(data.get('message') or '') url = str(data.get('url') or '') - chat_id = str(data.get('chat_id') or '') - if chat_id and url.endswith(f'/c/{chat_id}'): - url = f'{url[: -len(f"/c/{chat_id}")].rstrip("/")}/{chat_id}' body = '\n'.join(part for part in (content, url) if part) return ( f'**{title}**',