editForumTopic method
Use this method to edit name and icon of a topic in a forum supergroup chat.
The bot must be an administrator in the chat for this to work and must have canManageTopics
administrator rights, unless it is the creator of the topic.
Returns True on success.
Implementation
Future<bool> editForumTopic(dynamic chatId, String messageThreadId,
String name, String iconCustomEmojiId) 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('editForumTopic');
var body = <String, dynamic>{
'chat_id': chatId,
'message_thread_id': messageThreadId,
'name': name,
'icon_custom_emoji_id': iconCustomEmojiId,
};
return await HttpClient.httpPost(requestUrl, body: body);
}