mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-10 11:15:27 +00:00
Some fixes and speed improvments (#439)
* Use raw string for re pattern * Trim trailing whitespaces from docstrings and code * Use isinstance() instead of type() for typechecking * Remove unused imports
This commit is contained in:
@@ -1649,7 +1649,7 @@ class Client(Methods, BaseClient):
|
||||
try:
|
||||
return self.storage.get_peer_by_id(peer_id)
|
||||
except KeyError:
|
||||
if type(peer_id) is str:
|
||||
if isinstance(peer_id, str):
|
||||
if peer_id in ("self", "me"):
|
||||
return types.InputPeerSelf()
|
||||
|
||||
|
Reference in New Issue
Block a user