mirror of
https://github.com/open-webui/open-webui
synced 2025-01-01 08:42:14 +00:00
refac
This commit is contained in:
parent
50db2514dc
commit
2fd7bbc259
@ -252,6 +252,4 @@ def get_event_call(request_info):
|
|||||||
|
|
||||||
|
|
||||||
def get_user_id_from_session_pool(sid):
|
def get_user_id_from_session_pool(sid):
|
||||||
print("get_user_id_from_session_pool", sid)
|
|
||||||
print(SESSION_POOL.get(sid))
|
|
||||||
return SESSION_POOL.get(sid)
|
return SESSION_POOL.get(sid)
|
||||||
|
@ -602,12 +602,12 @@ async def process_chat_response(request, response, user, events, metadata, tasks
|
|||||||
if done:
|
if done:
|
||||||
data = {"done": True, "content": content, "title": title}
|
data = {"done": True, "content": content, "title": title}
|
||||||
|
|
||||||
|
# Send a webhook notification if the user is not active
|
||||||
if (
|
if (
|
||||||
get_user_id_from_session_pool(metadata["session_id"])
|
get_user_id_from_session_pool(metadata["session_id"])
|
||||||
is None
|
is None
|
||||||
):
|
):
|
||||||
webhook_url = Users.get_user_webhook_url_by_id(user.id)
|
webhook_url = Users.get_user_webhook_url_by_id(user.id)
|
||||||
print(f"webhook_url: {webhook_url}")
|
|
||||||
if webhook_url:
|
if webhook_url:
|
||||||
post_webhook(
|
post_webhook(
|
||||||
webhook_url,
|
webhook_url,
|
||||||
|
Loading…
Reference in New Issue
Block a user