unpinAllForumTopicMessages method
Use this method to clear the list of pinned messages in a forum topic.
The bot must be an administrator in the chat for this to work and must have the canPinMessages
administrator right in the supergroup.
Returns True on success.
https://core.telegram.org/bots/api#unpinallforumtopicmessages
Implementation
Future<bool> unpinAllForumTopicMessages(
dynamic chatId, String messageThreadId) async {
if (chatId is! String && chatId is! int) {
return Future.error(TelegramException(
'Attribute \'chatId\' can only be either type of String or int'));
}
var requestUrl = _apiUri('unpinAllForumTopicMessages');
var body = <String, dynamic>{
'chat_id': chatId,
'message_thread_id': messageThreadId,
};
return await HttpClient.httpPost(requestUrl, body: body);
}