diff --git a/telethon_generator/parser/tl_object.py b/telethon_generator/parser/tl_object.py index c096a233..fdcf5450 100755 --- a/telethon_generator/parser/tl_object.py +++ b/telethon_generator/parser/tl_object.py @@ -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