mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 19:20:09 +03:00
Use channels.GetFullChannel instead of messages.getPeerDialogs
Bots can't use messages.getPeerDialogs, so the only way to get the initial channel pts for them is to use getFullChannel.
This commit is contained in:
parent
5dcc30dcc6
commit
c604d8e728
|
@ -459,10 +459,10 @@ class UpdateMethods:
|
||||||
|
|
||||||
if not pts_date:
|
if not pts_date:
|
||||||
# First-time, can't get difference. Get pts instead.
|
# First-time, can't get difference. Get pts instead.
|
||||||
result = await self(functions.messages.GetPeerDialogsRequest([
|
result = await self(functions.channels.getFullChannel(
|
||||||
utils.get_input_dialog(where)
|
channel=where
|
||||||
]))
|
))
|
||||||
self._state_cache[channel_id] = result.dialogs[0].pts
|
self._state_cache[channel_id] = result.full_chat.pts
|
||||||
return
|
return
|
||||||
|
|
||||||
result = await self(functions.updates.GetChannelDifferenceRequest(
|
result = await self(functions.updates.GetChannelDifferenceRequest(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user