mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 12:53:44 +03:00
Fix get_entities_text with cls (#866)
This commit is contained in:
parent
dbb81173fa
commit
1eb4af33df
|
@ -604,16 +604,12 @@ class Message:
|
||||||
if not self.original_message.entities:
|
if not self.original_message.entities:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
if cls and self.original_message.entities:
|
ent = self.original_message.entities
|
||||||
texts = get_inner_text(
|
if cls and ent:
|
||||||
self.original_message.message,
|
ent = [c for c in ent if isinstance(c, cls)]
|
||||||
[c for c in self.original_message.entities
|
|
||||||
if isinstance(c, cls)]
|
texts = get_inner_text(self.original_message.message, ent)
|
||||||
)
|
return list(zip(ent, texts))
|
||||||
else:
|
|
||||||
texts = get_inner_text(self.original_message.message,
|
|
||||||
self.original_message.entities)
|
|
||||||
return list(zip(self.original_message.entities, texts))
|
|
||||||
|
|
||||||
async def click(self, i=None, j=None, *, text=None, filter=None):
|
async def click(self, i=None, j=None, *, text=None, filter=None):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user