mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +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
|
@property
|
||||||
def mention(self):
|
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
|
@staticmethod
|
||||||
def _parse(client, user: "raw.base.User") -> Optional["User"]:
|
def _parse(client, user: "raw.base.User") -> Optional["User"]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user