mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Fix user mentions for deleted accounts
This commit is contained in:
parent
124bcb4db7
commit
6fa4cdff15
1 changed files with 5 additions and 1 deletions
|
|
@ -195,7 +195,11 @@ class User(Object, Update):
|
|||
|
||||
@property
|
||||
def mention(self):
|
||||
return Link(f"tg://user?id={self.id}", self.first_name, self._client.parse_mode)
|
||||
return Link(
|
||||
f"tg://user?id={self.id}",
|
||||
self.first_name or "Deleted Account",
|
||||
self._client.parse_mode
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _parse(client, user: "raw.base.User") -> Optional["User"]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue