mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Bot API 5.0 pinning-unpinning logic post-fix.
This commit is contained in:
parent
0418818629
commit
6cc80f25d7
@ -830,9 +830,11 @@ def pin_chat_message(token, chat_id, message_id, disable_notification=None):
|
|||||||
return _make_request(token, method_url, params=payload, method='post')
|
return _make_request(token, method_url, params=payload, method='post')
|
||||||
|
|
||||||
|
|
||||||
def unpin_chat_message(token, chat_id, message_id=None):
|
def unpin_chat_message(token, chat_id, message_id):
|
||||||
method_url = 'unpinChatMessage'
|
method_url = 'unpinChatMessage'
|
||||||
payload = {'chat_id': chat_id, 'message_id': message_id}
|
payload = {'chat_id': chat_id}
|
||||||
|
if message_id:
|
||||||
|
payload['message_id'] = message_id
|
||||||
return _make_request(token, method_url, params=payload, method='post')
|
return _make_request(token, method_url, params=payload, method='post')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user