mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-13 12:16:09 +00:00
Fetch difference only if it is worth it
This commit is contained in:
@@ -87,12 +87,16 @@ class StateCache:
|
||||
types.updates.ChannelDifferenceEmpty,
|
||||
types.updates.ChannelDifferenceTooLong,
|
||||
types.updates.ChannelDifference
|
||||
))
|
||||
)),
|
||||
check_only=False
|
||||
):
|
||||
"""
|
||||
Update the state with the given update.
|
||||
"""
|
||||
cid = update.CONSTRUCTOR_ID
|
||||
if check_only:
|
||||
return cid in has_pts or cid in has_date or cid in has_channel_pts
|
||||
|
||||
if cid in has_pts:
|
||||
if cid in has_date:
|
||||
self._pts_date = update.pts, update.date
|
||||
|
||||
Reference in New Issue
Block a user