mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-09-19 10:22:45 +03:00
Corrected the offset
This commit is contained in:
parent
8238e99623
commit
1b6f4d26a5
|
@ -450,22 +450,22 @@ class UpdateMethods:
|
||||||
types.UpdateReadChannelOutbox,
|
types.UpdateReadChannelOutbox,
|
||||||
)):
|
)):
|
||||||
if is_min and update.pts:
|
if is_min and update.pts:
|
||||||
get_diff = functions.updates.GetChannelDifferenceRequest(
|
get_diff = functions.updates.GetChannelDifferenceRequest(
|
||||||
force=False,
|
force=False,
|
||||||
channel=await self.get_input_entity(update.message.peer_id),
|
channel=await self.get_input_entity(update.message.peer_id),
|
||||||
filter=types.ChannelMessagesFilter(
|
filter=types.ChannelMessagesFilter(
|
||||||
ranges=[types.MessageRange(
|
ranges=[types.MessageRange(
|
||||||
min_id=update.message.id,
|
min_id=update.message.id,
|
||||||
max_id=update.message.id
|
max_id=update.message.id
|
||||||
)]
|
)]
|
||||||
),
|
),
|
||||||
pts=update.pts - update.pts_count,
|
pts=update.pts - update.pts_count,
|
||||||
limit=update.pts
|
limit=update.pts
|
||||||
)
|
)
|
||||||
diff = await self(get_diff)
|
diff = await self(get_diff)
|
||||||
if not isinstance(diff, types.updates.ChannelDifferenceEmpty):
|
if not isinstance(diff, types.updates.ChannelDifferenceEmpty):
|
||||||
chats.update({utils.get_peer_id(x): x for x in diff.chats})
|
chats.update({utils.get_peer_id(x): x for x in diff.chats})
|
||||||
users.update({utils.get_peer_id(x): x for x in diff.users})
|
users.update({utils.get_peer_id(x): x for x in diff.users})
|
||||||
|
|
||||||
self._mb_entity_cache.extend(list(users.values()), list(chats.values()))
|
self._mb_entity_cache.extend(list(users.values()), list(chats.values()))
|
||||||
entities = users | chats
|
entities = users | chats
|
||||||
|
|
Loading…
Reference in New Issue
Block a user