UserKtx.transferChatOwnership - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.extensions / UserKtx / transferChatOwnership

transferChatOwnership

open suspend fun User.transferChatOwnership(chatId: Long, password: String?): Unit

Suspend function, which changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats.

Parameters

chatId - Chat identifier.

password - The password of the current user.