Fix send_message using the incorrect type to return the msg_id (#156)

This commit is contained in:
Lonami Exo 2017-07-04 16:53:07 +02:00
parent 3585fb8cc6
commit 9bb6353fa3
2 changed files with 7 additions and 4 deletions

View File

@ -50,7 +50,7 @@ class TelegramBareClient:
"""
# Current TelegramClient version
__version__ = '0.11.2'
__version__ = '0.11.3'
# region Initialization

View File

@ -382,13 +382,16 @@ class TelegramClient(TelegramBareClient):
no_web_page=False):
"""Sends a message to the given entity (or input peer)
and returns the sent message ID"""
result = self(SendMessageRequest(
request = SendMessageRequest(
peer=get_input_peer(entity),
message=message,
entities=[],
no_webpage=no_web_page
))
return result.random_id
)
result = self(request)
for handler in self._update_handlers:
handler(result)
return request.random_id
def get_message_history(self,
entity,