mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Fix user mentions for deleted accounts
This commit is contained in:
parent
124bcb4db7
commit
6fa4cdff15
@ -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 New Issue
Block a user