Add full_name property to Contact and corresponding tests (#1758)

* Add full_name property to Contact and corresponding tests

* Add brief description of changes
This commit is contained in:
m-xim 2026-02-02 04:22:15 +09:00 committed by GitHub
parent f2459fbcf2
commit 1708980ceb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 27 additions and 0 deletions

View file

@ -49,3 +49,9 @@ class Contact(TelegramObject):
vcard=vcard,
**__pydantic_kwargs,
)
@property
def full_name(self) -> str:
if self.last_name:
return f"{self.first_name} {self.last_name}"
return self.first_name