mirror of
https://github.com/gentoo-root/telegram-tracker
synced 2025-08-14 02:27:27 -07:00
Add a workaround to make 'me' work again
This commit is contained in:
parent
92f58b9bd4
commit
f9b76e45f2
1 changed files with 7 additions and 1 deletions
|
@ -49,7 +49,13 @@ client.start()
|
|||
online = None
|
||||
last_offline = None
|
||||
while True:
|
||||
contact = client.get_entity(contact_id)
|
||||
if contact_id in ['me', 'self']:
|
||||
# Workaround for the regression in Telethon that breaks get_entity('me'):
|
||||
# https://github.com/LonamiWebs/Telethon/issues/1024
|
||||
contact = client.get_me()
|
||||
else:
|
||||
contact = client.get_entity(contact_id)
|
||||
|
||||
if isinstance(contact.status, UserStatusOffline):
|
||||
if online != False:
|
||||
online = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue