From 7925087ac73e1606a442bf0e0e653a36023d0dc8 Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 27 Jul 2025 02:11:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=B2=20User=20@property=20full=5Fname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maxapi/types/users.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maxapi/types/users.py b/maxapi/types/users.py index b1c78d3..8b245cc 100644 --- a/maxapi/types/users.py +++ b/maxapi/types/users.py @@ -35,6 +35,13 @@ class User(BaseModel): avatar_url: Optional[str] = None full_avatar_url: Optional[str] = None commands: Optional[List[BotCommand]] = None + + @property + def full_name(self): + if self.last_name is None: + return self.first_name + + return f'{self.first_name} {self.last_name}' class Config: json_encoders = {