From 6515e966497d0c66fd47227c0738ed9e311f53b0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Nov 2025 03:46:05 +0300 Subject: [PATCH] add is_bot to current_user --- common_lib/utils/auth.py | 3 +++ pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common_lib/utils/auth.py b/common_lib/utils/auth.py index 5de047d..4109cbf 100644 --- a/common_lib/utils/auth.py +++ b/common_lib/utils/auth.py @@ -15,6 +15,7 @@ auth_scheme = HTTPBearer() @dataclass class CurrentUser: token: str + is_bot: bool user_id: str session_id: str permissions: List[str] @@ -56,6 +57,7 @@ async def _fetch_current_user( return CurrentUser( token=token, + is_bot=is_bot, user_id=data["user_id"], session_id=data["session_id"], permissions=data["permissions"] @@ -124,6 +126,7 @@ async def fetch_user_for_sio( return CurrentUser( token=token, + is_bot=is_bot, user_id=data["user_id"], session_id=data["session_id"], permissions=data["permissions"] diff --git a/pyproject.toml b/pyproject.toml index daa2a13..0427e0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "common-lib" -version = "0.0.36" +version = "0.0.37" description = "Библиотека общих компонентов для микросервисов yobble" authors = [{ name = "cheykrym", email = "you@example.com" }] license = "MIT"