Fix pin_message not accepting Message objects (#1322)

This commit is contained in:
painor 2019-11-04 09:46:17 +01:00 committed by Lonami
parent 3d1ce845be
commit 4839d8bf59

View File

@ -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,