Fix initial state if session in memory

This commit is contained in:
bugchecker 2019-04-13 16:52:17 +00:00 committed by GitHub
parent bd6c03e5f9
commit ec159ca497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,7 +311,7 @@ class TelegramBaseClient(abc.ABC):
# is lightweight and immutable we can easily copy them around to
# each update in case they need to fetch missing entities.
state = self.session.get_update_state(0)
self._old_pts_date = state.pts, state.date
self._old_pts_date = (state.pts, state.date) if state else (None, None)
self._new_pts_date = (None, None)
# Some further state for subclasses