diff --git a/client/src/telethon/_impl/client/client/client.py b/client/src/telethon/_impl/client/client/client.py index 62a62740..a1879fa3 100644 --- a/client/src/telethon/_impl/client/client/client.py +++ b/client/src/telethon/_impl/client/client/client.py @@ -80,7 +80,7 @@ from .users import ( get_input_entity, get_me, get_peer_id, - input_as_peer, + input_to_peer, resolve_to_packed, ) @@ -344,8 +344,8 @@ class Client: async def _resolve_to_packed(self, chat: ChatLike) -> PackedChat: return await resolve_to_packed(self, chat) - def _input_as_peer(self, input: Optional[abcs.InputPeer]) -> Optional[abcs.Peer]: - return input_as_peer(self, input) + def _input_to_peer(self, input: Optional[abcs.InputPeer]) -> Optional[abcs.Peer]: + return input_to_peer(self, input) async def get_peer_id(self) -> None: await get_peer_id(self) diff --git a/client/src/telethon/_impl/client/client/messages.py b/client/src/telethon/_impl/client/client/messages.py index 4bb8ec4d..396cc09f 100644 --- a/client/src/telethon/_impl/client/client/messages.py +++ b/client/src/telethon/_impl/client/client/messages.py @@ -497,7 +497,7 @@ class MessageMap: def _empty(self, id: int = 0) -> Message: return Message._from_raw( - types.MessageEmpty(id=id, peer_id=self._client._input_as_peer(self._peer)) + types.MessageEmpty(id=id, peer_id=self._client._input_to_peer(self._peer)) ) diff --git a/client/src/telethon/_impl/client/client/users.py b/client/src/telethon/_impl/client/client/users.py index c6e7d0b5..8a2ec6ac 100644 --- a/client/src/telethon/_impl/client/client/users.py +++ b/client/src/telethon/_impl/client/client/users.py @@ -86,7 +86,7 @@ async def resolve_to_packed(self: Client, chat: ChatLike) -> PackedChat: raise ValueError("Cannot resolve chat") -def input_as_peer(self: Client, input: Optional[abcs.InputPeer]) -> Optional[abcs.Peer]: +def input_to_peer(self: Client, input: Optional[abcs.InputPeer]) -> Optional[abcs.Peer]: if input is None: return None elif isinstance(input, types.InputPeerEmpty):