From ac5f8da50c3364692f8d3c2d2b423a18e4800940 Mon Sep 17 00:00:00 2001 From: Lonami Date: Tue, 10 Jul 2018 16:59:40 +0200 Subject: [PATCH] Fix update.pts may be None --- telethon/client/updates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/client/updates.py b/telethon/client/updates.py index 2b6f6a4e..32e39eac 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -188,7 +188,7 @@ class UpdateMethods(UserMethods): self._loop.create_task(self._dispatch_queue_updates()) need_diff = False - if hasattr(update, 'pts'): + if hasattr(update, 'pts') and update.pts is not None: if self._state.pts and (update.pts - self._state.pts) > 1: need_diff = True self._state.pts = update.pts