mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
Rename send_read_acknowledge
This commit is contained in:
parent
1b15a34f69
commit
010ee0813a
|
@ -716,3 +716,5 @@ size selector for download_profile_photo and download_media is now different
|
|||
still thumb because otherwise documents are weird.
|
||||
|
||||
keep support for explicit size instance?
|
||||
|
||||
renamed send_read_acknowledge. add send_read_acknowledge as alias for mark_read?
|
||||
|
|
|
@ -667,7 +667,7 @@ async def delete_messages(
|
|||
|
||||
return sum(r.pts_count for r in res)
|
||||
|
||||
async def send_read_acknowledge(
|
||||
async def mark_read(
|
||||
self: 'TelegramClient',
|
||||
entity: 'hints.EntityLike',
|
||||
message: 'typing.Union[hints.MessageIDLike, typing.Sequence[hints.MessageIDLike]]' = None,
|
||||
|
|
|
@ -2490,8 +2490,8 @@ class TelegramClient:
|
|||
await client.delete_messages(chat, messages)
|
||||
"""
|
||||
|
||||
@forward_call(messages.send_read_acknowledge)
|
||||
async def send_read_acknowledge(
|
||||
@forward_call(messages.mark_read)
|
||||
async def mark_read(
|
||||
self: 'TelegramClient',
|
||||
entity: 'hints.EntityLike',
|
||||
message: 'typing.Union[hints.MessageIDLike, typing.Sequence[hints.MessageIDLike]]' = None,
|
||||
|
@ -2535,11 +2535,11 @@ class TelegramClient:
|
|||
.. code-block:: python
|
||||
|
||||
# using a Message object
|
||||
await client.send_read_acknowledge(chat, message)
|
||||
await client.mark_read(chat, message)
|
||||
# ...or using the int ID of a Message
|
||||
await client.send_read_acknowledge(chat, message_id)
|
||||
await client.mark_read(chat, message_id)
|
||||
# ...or passing a list of messages to mark as read
|
||||
await client.send_read_acknowledge(chat, messages)
|
||||
await client.mark_read(chat, messages)
|
||||
"""
|
||||
|
||||
@forward_call(messages.pin_message)
|
||||
|
|
|
@ -310,12 +310,12 @@ class Album(EventBuilder):
|
|||
async def mark_read(self):
|
||||
"""
|
||||
Marks the entire album as read. Shorthand for
|
||||
`client.send_read_acknowledge()
|
||||
<telethon.client.messages.MessageMethods.send_read_acknowledge>`
|
||||
`client.mark_read()
|
||||
<telethon.client.messages.MessageMethods.mark_read>`
|
||||
with both ``entity`` and ``message`` already set.
|
||||
"""
|
||||
if self._client:
|
||||
await self._client.send_read_acknowledge(
|
||||
await self._client.mark_read(
|
||||
await self.get_input_chat(), max_id=self.messages[-1].id)
|
||||
|
||||
async def pin(self, *, notify=False):
|
||||
|
|
|
@ -1237,12 +1237,12 @@ class Message(ChatGetter, SenderGetter):
|
|||
async def mark_read(self):
|
||||
"""
|
||||
Marks the message as read. Shorthand for
|
||||
`client.send_read_acknowledge()
|
||||
<telethon.client.messages.MessageMethods.send_read_acknowledge>`
|
||||
`client.mark_read()
|
||||
<telethon.client.messages.MessageMethods.mark_read>`
|
||||
with both ``entity`` and ``message`` already set.
|
||||
"""
|
||||
if self._client:
|
||||
await self._client.send_read_acknowledge(
|
||||
await self._client.mark_read(
|
||||
await self.get_input_chat(), max_id=self.id)
|
||||
|
||||
async def pin(self, *, notify=False, pm_oneside=False):
|
||||
|
|
Loading…
Reference in New Issue
Block a user