Treat arguments with _until or _since in their name as dates

This commit is contained in:
Lonami Exo 2019-03-06 08:36:37 +01:00
parent 0f69455dc7
commit ae8f1fed05

View File

@ -140,7 +140,7 @@ class TLArg:
# treated as a "date" object. Note that this is not a valid
# Telegram object, but it's easier to work with
if self.type == 'int' and (
re.search(r'(\b|_)date\b', name) or
re.search(r'(\b|_)(date|until|since)\b', name) or
name in ('expires', 'expires_at', 'was_online')):
self.type = 'date'