mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
Make invite links of public channels work with get_chat
This commit is contained in:
parent
1f8f313398
commit
372bbabe28
2 changed files with 5 additions and 0 deletions
|
|
@ -103,6 +103,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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue