mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Merge branch 'master' into new-api
This commit is contained in:
commit
2f52b0e144
@ -289,6 +289,9 @@ class Client:
|
|||||||
now = time.time()
|
now = time.time()
|
||||||
|
|
||||||
if abs(now - self.date) > Client.OFFLINE_SLEEP:
|
if abs(now - self.date) > Client.OFFLINE_SLEEP:
|
||||||
|
self.peers_by_username = {}
|
||||||
|
self.peers_by_phone = {}
|
||||||
|
|
||||||
self.get_dialogs()
|
self.get_dialogs()
|
||||||
self.get_contacts()
|
self.get_contacts()
|
||||||
else:
|
else:
|
||||||
@ -534,9 +537,6 @@ class Client:
|
|||||||
if isinstance(entity, types.User):
|
if isinstance(entity, types.User):
|
||||||
user_id = entity.id
|
user_id = entity.id
|
||||||
|
|
||||||
if user_id in self.peers_by_id:
|
|
||||||
continue
|
|
||||||
|
|
||||||
access_hash = entity.access_hash
|
access_hash = entity.access_hash
|
||||||
|
|
||||||
if access_hash is None:
|
if access_hash is None:
|
||||||
@ -562,9 +562,6 @@ class Client:
|
|||||||
chat_id = entity.id
|
chat_id = entity.id
|
||||||
peer_id = -chat_id
|
peer_id = -chat_id
|
||||||
|
|
||||||
if peer_id in self.peers_by_id:
|
|
||||||
continue
|
|
||||||
|
|
||||||
input_peer = types.InputPeerChat(
|
input_peer = types.InputPeerChat(
|
||||||
chat_id=chat_id
|
chat_id=chat_id
|
||||||
)
|
)
|
||||||
@ -575,9 +572,6 @@ class Client:
|
|||||||
channel_id = entity.id
|
channel_id = entity.id
|
||||||
peer_id = int("-100" + str(channel_id))
|
peer_id = int("-100" + str(channel_id))
|
||||||
|
|
||||||
if peer_id in self.peers_by_id:
|
|
||||||
continue
|
|
||||||
|
|
||||||
access_hash = entity.access_hash
|
access_hash = entity.access_hash
|
||||||
|
|
||||||
if access_hash is None:
|
if access_hash is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user