Class TdApi.TransferChatOwnership

  • Enclosing class:
    TdApi

    public static class TdApi.TransferChatOwnership
    extends TdApi.Function
    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.

    Returns Ok

    • Field Detail

      • chatId

        public long chatId
        Chat identifier.
      • userId

        public long userId
        Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user.
      • password

        public String password
        The password of the current user.
      • CONSTRUCTOR

        public static final int CONSTRUCTOR
        Identifier uniquely determining type of the object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TransferChatOwnership

        public TransferChatOwnership()
        Default constructor for a 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.

        Returns Ok

      • TransferChatOwnership

        public TransferChatOwnership​(long chatId,
                                     long userId,
                                     String password)
        Creates a 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.

        Returns Ok

        Parameters:
        chatId - Chat identifier.
        userId - Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user.
        password - The password of the current user.