             uncurryResponse(response, success: success, failure: failure)
         }
     }
-    
-    /// Add child space to the current space using current homeserver as via server.
-    /// - Parameters:
-    ///   - spaceId: The room id of the child space.
-    ///   - order: Is a string which is used to provide a default ordering of siblings in the room list. Orders should be a string of ascii characters in the range \x20 (space) to \x7F (~), and should be less or equal 50 characters.
-    ///   - autoJoin: Allows a space admin to list the sub-spaces and rooms in that space which should be automatically joined by members of that space.
-    ///   - suggested: Indicates that the child should be advertised to members of the space by the client. This could be done by showing them eagerly in the room list.
-    ///   - success: A closure called when the operation is complete. Provides the event id of the event generated on the home server on success.
-    ///   - failure: A closure called  when the operation fails.
-    /// - Returns: a `MXHTTPOperation` instance.
-    @discardableResult
-    public func addChildWithDefaultViaServer(spaceId: String,
-                                             order: String?,
-                                             autoJoin: Bool,
-                                             suggested: Bool,
-                                             success: @escaping (String?) -> Void,
-                                             failure: @escaping (Error) -> Void) -> MXHTTPOperation? {
-        return self.addChildWithDefaultViaServer(spaceId: spaceId, order: order, autoJoin: autoJoin, suggested: suggested) { (response) in
-            uncurryResponse(response, success: success, failure: failure)
-        }
-    }
 }

    /// - Returns: a `MXHTTPOperation` instance.
    @discardableResult
    public func addChild(spaceId: String,
                         viaServers: [String],
                         order: String?,
                         autoJoin: Bool,
                         suggested: Bool,
                         completion: @escaping (_ response: MXResponse<String?>) -> Void) -> MXHTTPOperation? {
        
        let spaceChild = MXSpaceChildContent()
        spaceChild.via = viaServers
        spaceChild.order = order
        spaceChild.autoJoin = autoJoin
        spaceChild.suggested = suggested
        
        guard let stateEventContent = spaceChild.jsonDictionary() as? [String: Any] else {
            fatalError("[MXSpace] MXSpaceChildContent dictionary cannot be nil")
        }
        
        return self.room.sendStateEvent(.spaceChild,
                                 content: stateEventContent,
                                 stateKey: spaceId,
                                 completion: completion)
    }
    
    /// Add child space to the current space using current homeserver as via server.
    /// - Parameters:
    ///   - spaceId: The room id of the child space.
    ///   - order: Is a string which is used to provide a default ordering of siblings in the room list. Orders should be a string of ascii characters in the range \x20 (space) to \x7F (~), and should be less or equal 50 characters.
    ///   - autoJoin: Allows a space admin to list the sub-spaces and rooms in that space which should be automatically joined by members of that space.
    ///   - suggested: Indicates that the child should be advertised to members of the space by the client. This could be done by showing them eagerly in the room list.
    ///   - completion: A closure called when the operation completes. Provides the event id of the event generated on the home server on success.
    /// - Returns: a `MXHTTPOperation` instance.
    @discardableResult
    public func addChildWithDefaultViaServer(spaceId: String,
                                             order: String?,
                                             autoJoin: Bool,
                                             suggested: Bool,
                                             completion: @escaping (_ response: MXResponse<String?>) -> Void) -> MXHTTPOperation? {
        
        guard let homeserverName = self.room.mxSession.credentials.homeServerName() else {
            completion(.failure(MXSpaceError.homeserverNameNotFound))
            return nil
        }
        
        let spaceChild = MXSpaceChildContent()
        spaceChild.via = [homeserverName]
        spaceChild.order = order
        spaceChild.autoJoin = autoJoin
        spaceChild.suggested = suggested

    /// - Parameters:
    ///   - spaceId: The room id of the child space.
    ///   - viaServers: List of candidate servers that can be used to join the space. Children where via is not present are ignored.
    ///   If nil value is set current homeserver will be used as via server.
    ///   - order: Is a string which is used to provide a default ordering of siblings in the room list. Orders should be a string of ascii characters in the range \x20 (space) to \x7F (~), and should be less or equal 50 characters.
    ///   - autoJoin: Allows a space admin to list the sub-spaces and rooms in that space which should be automatically joined by members of that space.
    ///   - suggested: Indicates that the child should be advertised to members of the space by the client. This could be done by showing them eagerly in the room list.
