Make invite links of public channels work with get_chat
This commit is contained in:
parent
1f8f313398
commit
372bbabe28
@ -103,6 +103,9 @@ class BaseClient:
|
|||||||
def resolve_peer(self, peer_id: int or str):
|
def resolve_peer(self, peer_id: int or str):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def fetch_peers(self, entities):
|
||||||
|
pass
|
||||||
|
|
||||||
def add_handler(self, handler, group: int = 0) -> tuple:
|
def add_handler(self, handler, group: int = 0) -> tuple:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ class GetChat(BaseClient):
|
|||||||
if isinstance(r, types.ChatInvite):
|
if isinstance(r, types.ChatInvite):
|
||||||
raise ValueError("You haven't joined \"t.me/joinchat/{}\" yet".format(h))
|
raise ValueError("You haven't joined \"t.me/joinchat/{}\" yet".format(h))
|
||||||
|
|
||||||
|
self.fetch_peers([r.chat])
|
||||||
|
|
||||||
if isinstance(r.chat, types.Chat):
|
if isinstance(r.chat, types.Chat):
|
||||||
chat_id = -r.chat.id
|
chat_id = -r.chat.id
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user