1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #1026 from Badiboy/master

Bot API 5.0 pinning-unpinning logic post-fix.
This commit is contained in:
Badiboy
2020-11-29 16:11:46 +03:00
committed by GitHub

View File

@ -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')
def unpin_chat_message(token, chat_id, message_id=None):
def unpin_chat_message(token, chat_id, message_id):
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')