pub async fn transfer_chat_ownership(
chat_id: i64,
user_id: i64,
password: String,
client_id: i32,
) -> Result<(), Error>Expand description
Changes the owner of a chat; requires owner privileges in 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
§Arguments
chat_id- Chat identifieruser_id- Identifier of the user to which transfer the ownership. The ownership can’t be transferred to a bot or to a deleted userpassword- The 2-step verification password of the current userclient_id- The client id to send the request to