Merge branch 'develop' into asyncio

# Conflicts:
#	pyrogram/__init__.py
This commit is contained in:
Dan 2019-01-03 09:15:44 +01:00
commit b7b31d39e8
4 changed files with 7 additions and 2 deletions

View File

@ -82,7 +82,7 @@ If no error shows up you are good to go.
>>> import pyrogram
>>> pyrogram.__version__
'0.10.2'
'0.10.3'
.. _TgCrypto: https://docs.pyrogram.ml/resources/TgCrypto
.. _develop: http://github.com/pyrogram/pyrogram

View File

@ -31,7 +31,7 @@ __copyright__ = "Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance
"e" if sys.getfilesystemencoding() != "utf-8" else "\xe8"
)
__license__ = "GNU Lesser General Public License v3 or later (LGPLv3+)"
__version__ = "0.10.2.asyncio"
__version__ = "0.10.3.asyncio"
from .api.errors import Error
from .client.types import (

View File

@ -102,6 +102,9 @@ class BaseClient:
def resolve_peer(self, peer_id: int or str):
pass
def fetch_peers(self, entities):
pass
def add_handler(self, handler, group: int = 0) -> tuple:
pass

View File

@ -56,6 +56,8 @@ class GetChat(BaseClient):
if isinstance(r, types.ChatInvite):
raise ValueError("You haven't joined \"t.me/joinchat/{}\" yet".format(h))
self.fetch_peers([r.chat])
if isinstance(r.chat, types.Chat):
chat_id = -r.chat.id