diff --git a/telethon/client/messages.py b/telethon/client/messages.py index de9e7b75..4dc72bd7 100644 --- a/telethon/client/messages.py +++ b/telethon/client/messages.py @@ -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,