mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-19 21:11:06 +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)
|
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.
|
Get the latest basic information about the given chats.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from __future__ import annotations
|
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 ...mtproto import RpcError
|
||||||
from ...session import PackedChat, PackedType
|
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] = []
|
packed_chats: List[PackedChat] = []
|
||||||
input_users: List[types.InputUser] = []
|
input_users: List[types.InputUser] = []
|
||||||
input_chats: List[int] = []
|
input_chats: List[int] = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user