From 8a9de0a62f58daa72e7d19798dfd5bc429eafa6f Mon Sep 17 00:00:00 2001 From: root Date: Sun, 27 Apr 2025 21:31:34 +0200 Subject: [PATCH] Fix bug that never triggers user notification webhooks --- backend/open_webui/utils/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index df771764c..0d6951c58 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -1133,7 +1133,7 @@ async def process_chat_response( ) # Send a webhook notification if the user is not active - if get_active_status_by_user_id(user.id) is None: + if get_active_status_by_user_id(user.id): webhook_url = Users.get_user_webhook_url_by_id(user.id) if webhook_url: post_webhook( @@ -2224,7 +2224,7 @@ async def process_chat_response( ) # Send a webhook notification if the user is not active - if get_active_status_by_user_id(user.id) is None: + if get_active_status_by_user_id(user.id): webhook_url = Users.get_user_webhook_url_by_id(user.id) if webhook_url: post_webhook(