mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Handle more cases where the type is a date
This commit is contained in:
parent
0ef32a7d78
commit
b84641023a
|
@ -165,7 +165,9 @@ class TLArg:
|
|||
# The name may contain "date" in it, if this is the case and the type is "int",
|
||||
# we can safely assume that this should be treated as a "date" object.
|
||||
# Note that this is not a valid Telegram object, but it's easier to work with
|
||||
if re.search(r'(\b|_)date\b', name) and self.type == 'int':
|
||||
if self.type == 'int' and (
|
||||
re.search(r'(\b|_)date\b', name) or
|
||||
name in ('expires', 'expires_at', 'was_online')):
|
||||
self.type = 'date'
|
||||
|
||||
self.generic_definition = generic_definition
|
||||
|
|
Loading…
Reference in New Issue
Block a user