mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Fix pin_message not accepting Message objects (#1322)
This commit is contained in:
parent
3d1ce845be
commit
4839d8bf59
|
@ -1210,9 +1210,7 @@ class MessageMethods:
|
|||
message = await client.send_message(chat, 'Pinotifying is fun!')
|
||||
await client.pin_message(chat, message, notify=True)
|
||||
"""
|
||||
if not message:
|
||||
message = 0
|
||||
|
||||
message = utils.get_message_id(message) or 0
|
||||
entity = await self.get_input_entity(entity)
|
||||
await self(functions.messages.UpdatePinnedMessageRequest(
|
||||
peer=entity,
|
||||
|
|
Loading…
Reference in New Issue
Block a user