mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +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:
|
||||
return []
|
||||
|
||||
if cls and self.original_message.entities:
|
||||
texts = get_inner_text(
|
||||
self.original_message.message,
|
||||
[c for c in self.original_message.entities
|
||||
if isinstance(c, cls)]
|
||||
)
|
||||
else:
|
||||
texts = get_inner_text(self.original_message.message,
|
||||
self.original_message.entities)
|
||||
return list(zip(self.original_message.entities, texts))
|
||||
ent = self.original_message.entities
|
||||
if cls and ent:
|
||||
ent = [c for c in ent if isinstance(c, cls)]
|
||||
|
||||
texts = get_inner_text(self.original_message.message, ent)
|
||||
return list(zip(ent, texts))
|
||||
|
||||
async def click(self, i=None, j=None, *, text=None, filter=None):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user