mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Bot API 5.0 pinning-unpinning logic update
+ add unpin_all_chat_messages() (former unpin_chat_message()) * update unpin_chat_message() (add message_id arg)
This commit is contained in:
@ -830,8 +830,14 @@ 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):
|
||||
def unpin_chat_message(token, chat_id, message_id):
|
||||
method_url = 'unpinChatMessage'
|
||||
payload = {'chat_id': chat_id, 'message_id': message_id}
|
||||
return _make_request(token, method_url, params=payload, method='post')
|
||||
|
||||
|
||||
def unpin_all_chat_messages(token, chat_id):
|
||||
method_url = 'unpinAllChatMessages'
|
||||
payload = {'chat_id': chat_id}
|
||||
return _make_request(token, method_url, params=payload, method='post')
|
||||
|
||||
|
Reference in New Issue
Block a user