From d472348bc7f7af598a0bfafbd3732c001518a0fb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 23 Oct 2025 00:54:59 +0300 Subject: [PATCH] add bots token --- common_lib/utils/auth.py | 7 ++++--- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common_lib/utils/auth.py b/common_lib/utils/auth.py index 593879b..a25c41d 100644 --- a/common_lib/utils/auth.py +++ b/common_lib/utils/auth.py @@ -20,7 +20,6 @@ class CurrentUser: session_id: str permissions: List[str] - async def _fetch_current_user( request: Request, credentials: HTTPAuthorizationCredentials, @@ -76,7 +75,8 @@ async def fetch_user_for_sio( token: str, ip: str, user_agent: str, - require_permissions: bool = False + require_permissions: bool = False, + is_bot: bool = False ) -> CurrentUser: """ Fetches user data for Socket.IO, decoupled from FastAPI's Request object. @@ -88,7 +88,8 @@ async def fetch_user_for_sio( "token": token, "ip": ip, "user_agent": user_agent, - "require_permissions": require_permissions + "require_permissions": require_permissions, + "is_bot": is_bot, }, ) except httpx.RequestError as e: diff --git a/pyproject.toml b/pyproject.toml index a1ea0d3..f82843a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "common-lib" -version = "0.0.31" +version = "0.0.32" description = "Библиотека общих компонентов для микросервисов yobble" authors = [{ name = "cheykrym", email = "you@example.com" }] license = "MIT"