Skip to content

Commit

Permalink
Fix pin_message not accepting Message objects (#1322)
Browse files Browse the repository at this point in the history
  • Loading branch information
painor authored and Lonami committed Nov 4, 2019
1 parent 3d1ce84 commit 4839d8b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions telethon/client/messages.py
Expand Up @@ -1210,9 +1210,7 @@ async def pin_message(
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,
Expand Down

0 comments on commit 4839d8b

Please sign in to comment.