refac
This commit is contained in:
1 parent
f949d17db1
commit
c24a4da17d
3 files changed
+10
-7
No files matched your search
@@ -3098,7 +3098,7 @@ async def non_streaming_chat_response_handler(response, ctx):
|
||||
)
|
||||
|
||||
# Send a webhook notification if the user is not active
|
||||
if not Users.is_user_active(user.id):
|
||||
if request.app.state.config.ENABLE_USER_WEBHOOKS and not Users.is_user_active(user.id):
|
||||
webhook_url = Users.get_user_webhook_url_by_id(user.id)
|
||||
if webhook_url:
|
||||
await post_webhook(
|
||||
@@ -4587,7 +4587,7 @@ async def streaming_chat_response_handler(response, ctx):
|
||||
)
|
||||
|
||||
# Send a webhook notification if the user is not active
|
||||
if not Users.is_user_active(user.id):
|
||||
if request.app.state.config.ENABLE_USER_WEBHOOKS and not Users.is_user_active(user.id):
|
||||
webhook_url = Users.get_user_webhook_url_by_id(user.id)
|
||||
if webhook_url:
|
||||
await post_webhook(
|
||||
|
||||
Reference in new issue
Block a user