diff --git a/lib/client.js b/lib/client.js index 901a9bf92..b0041b542 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1359,16 +1359,13 @@ MatrixClient.prototype.inviteByEmail = function(roomId, email, displayName, call * @param {string} address The address for the specified medium. * @param {string} displayName The human-readable name to show in the room for * this invite. MUST NOT be the address. - * @param {string} idServer Optional. The identity server URL to use for inviting. * @param {module:client.callback} callback Optional. * @return {module:client.Promise} Resolves: TODO * @return {module:http-api.MatrixError} Rejects: with an error response. * @throws If displayName contains the address. */ MatrixClient.prototype.inviteByThreePid = function(roomId, medium, address, - displayName, idServer, callback) { - if (utils.isFunction(idServer)) { callback = idServer; idServer = undefined; } - idServer = idServer || this.getIdentityServerUrl(); + displayName, callback) { if (displayName && displayName.indexOf(address) >= 0) { throw new Error( "The display name contains the address. This leaks the 3PID " + @@ -1382,7 +1379,7 @@ MatrixClient.prototype.inviteByThreePid = function(roomId, medium, address, ); return this._http.authedRequest(callback, "POST", path, undefined, { - id_server: idServer, + id_server: this.getIdentityServerUrl(), medium: medium, address: address, display_name: displayName