mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-25 00:34:19 +03:00
Fix send_message using the incorrect type to return the msg_id (#156)
This commit is contained in:
parent
3585fb8cc6
commit
9bb6353fa3
|
@ -50,7 +50,7 @@ class TelegramBareClient:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Current TelegramClient version
|
# Current TelegramClient version
|
||||||
__version__ = '0.11.2'
|
__version__ = '0.11.3'
|
||||||
|
|
||||||
# region Initialization
|
# region Initialization
|
||||||
|
|
||||||
|
|
|
@ -382,13 +382,16 @@ class TelegramClient(TelegramBareClient):
|
||||||
no_web_page=False):
|
no_web_page=False):
|
||||||
"""Sends a message to the given entity (or input peer)
|
"""Sends a message to the given entity (or input peer)
|
||||||
and returns the sent message ID"""
|
and returns the sent message ID"""
|
||||||
result = self(SendMessageRequest(
|
request = SendMessageRequest(
|
||||||
peer=get_input_peer(entity),
|
peer=get_input_peer(entity),
|
||||||
message=message,
|
message=message,
|
||||||
entities=[],
|
entities=[],
|
||||||
no_webpage=no_web_page
|
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,
|
def get_message_history(self,
|
||||||
entity,
|
entity,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user