mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Add pm_oneside parameter in pin_message (#3095)
This commit is contained in:
@@ -1038,7 +1038,7 @@ class Message(ChatGetter, SenderGetter, TLObject):
|
||||
await self._client.send_read_acknowledge(
|
||||
await self.get_input_chat(), max_id=self.id)
|
||||
|
||||
async def pin(self, *, notify=False):
|
||||
async def pin(self, *, notify=False, pm_oneside=False):
|
||||
"""
|
||||
Pins the message. Shorthand for
|
||||
`telethon.client.messages.MessageMethods.pin_message`
|
||||
@@ -1049,7 +1049,7 @@ class Message(ChatGetter, SenderGetter, TLObject):
|
||||
# That or figure out a way to always set it directly.
|
||||
if self._client:
|
||||
return await self._client.pin_message(
|
||||
await self.get_input_chat(), self.id, notify=notify)
|
||||
await self.get_input_chat(), self.id, notify=notify, pm_oneside=pm_oneside)
|
||||
|
||||
async def unpin(self):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user