From ae8f1fed05e3e1b99893c21ed1ae20c10c5bd7f7 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Wed, 6 Mar 2019 08:36:37 +0100 Subject: [PATCH] Treat arguments with _until or _since in their name as dates --- telethon_generator/parsers/tlobject/tlarg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon_generator/parsers/tlobject/tlarg.py b/telethon_generator/parsers/tlobject/tlarg.py index 113cfe4d..400acc7d 100644 --- a/telethon_generator/parsers/tlobject/tlarg.py +++ b/telethon_generator/parsers/tlobject/tlarg.py @@ -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'