mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-16 19:41:07 +03:00
Fix CallbackQuery using string regex
This commit is contained in:
parent
419fe6dca3
commit
a9a2401e44
|
@ -36,7 +36,8 @@ class CallbackQuery(EventBuilder):
|
|||
self.data = data
|
||||
elif hasattr(data, 'match') and callable(data.match):
|
||||
if not isinstance(getattr(data, 'pattern', b''), bytes):
|
||||
data = re.compile(data.pattern.encode('utf-8'), data.flags)
|
||||
data = re.compile(data.pattern.encode('utf-8'),
|
||||
data.flags & (~re.UNICODE))
|
||||
|
||||
self.data = data.match
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user