mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-09 08:00:53 +03:00
Fix constructing PtsInfo for channels
This commit is contained in:
parent
0d597d1003
commit
de2cd1f2cf
|
@ -69,7 +69,10 @@ class PtsInfo:
|
|||
pts = getattr(update, 'pts', None)
|
||||
if pts:
|
||||
pts_count = getattr(update, 'pts_count', None) or 0
|
||||
entry = getattr(update, 'channel_id', None) or ENTRY_ACCOUNT
|
||||
try:
|
||||
entry = update.message.peer_id.channel_id
|
||||
except AttributeError:
|
||||
entry = getattr(update, 'channel_id', None) or ENTRY_ACCOUNT
|
||||
return cls(pts=pts, pts_count=pts_count, entry=entry)
|
||||
|
||||
qts = getattr(update, 'qts', None)
|
||||
|
|
Loading…
Reference in New Issue
Block a user