From 69f81785bfdd69e4d25646e24bbfff3c6aaa096e Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 6 Feb 2020 23:15:13 +0600 Subject: [PATCH] rename RequestsExecutor#setChatPermissions -> RequestsExecutor#setDefaultChatMembersPermissions --- .../requests/chat/modify/SetChatPermissions.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt index 57fa318efb..b365d7fae9 100644 --- a/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt +++ b/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/chat/modify/SetChatPermissions.kt @@ -5,7 +5,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.types.* import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions -import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat import kotlinx.serialization.* import kotlinx.serialization.internal.BooleanSerializer @@ -24,12 +23,12 @@ data class SetChatPermissions ( get() = serializer() } -suspend fun RequestsExecutor.setChatPermissions( +suspend fun RequestsExecutor.setDefaultChatMembersPermissions( chatId: ChatIdentifier, permissions: ChatPermissions ) = execute(SetChatPermissions(chatId, permissions)) -suspend fun RequestsExecutor.setChatPermissions( +suspend fun RequestsExecutor.setDefaultChatMembersPermissions( chat: PublicChat, permissions: ChatPermissions -) = setChatPermissions(chat.id, permissions) +) = setDefaultChatMembersPermissions(chat.id, permissions)