mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-04 01:47:27 +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!')
 | 
					                message = await client.send_message(chat, 'Pinotifying is fun!')
 | 
				
			||||||
                await client.pin_message(chat, message, notify=True)
 | 
					                await client.pin_message(chat, message, notify=True)
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        if not message:
 | 
					        message = utils.get_message_id(message) or 0
 | 
				
			||||||
            message = 0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        entity = await self.get_input_entity(entity)
 | 
					        entity = await self.get_input_entity(entity)
 | 
				
			||||||
        await self(functions.messages.UpdatePinnedMessageRequest(
 | 
					        await self(functions.messages.UpdatePinnedMessageRequest(
 | 
				
			||||||
            peer=entity,
 | 
					            peer=entity,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user