mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix footgun in get_chats
This commit is contained in:
parent
c15d07aa16
commit
9afe2f853d
|
@ -690,7 +690,9 @@ class Client:
|
|||
"""
|
||||
return get_admin_log(self, chat)
|
||||
|
||||
async def get_chats(self, chats: Sequence[ChatLike]) -> List[Chat]:
|
||||
async def get_chats(
|
||||
self, chats: Union[List[ChatLike], Tuple[ChatLike, ...]]
|
||||
) -> List[Chat]:
|
||||
"""
|
||||
Get the latest basic information about the given chats.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, List, Optional, Sequence, Union
|
||||
from typing import TYPE_CHECKING, List, Optional, Tuple, Union
|
||||
|
||||
from ...mtproto import RpcError
|
||||
from ...session import PackedChat, PackedType
|
||||
|
@ -74,7 +74,9 @@ async def resolve_username(self: Client, username: str) -> Chat:
|
|||
)
|
||||
|
||||
|
||||
async def get_chats(self: Client, chats: Sequence[ChatLike]) -> List[Chat]:
|
||||
async def get_chats(
|
||||
self: Client, chats: Union[List[ChatLike], Tuple[ChatLike, ...]]
|
||||
) -> List[Chat]:
|
||||
packed_chats: List[PackedChat] = []
|
||||
input_users: List[types.InputUser] = []
|
||||
input_chats: List[int] = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user