You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-09 10:22:46 +03:00
Don't allow the IS URL to be configured on a per-request basis.
This commit is contained in:
@@ -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 <code>displayName</code> contains the <code>address</code>.
|
||||
*/
|
||||
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
|
||||
|
Reference in New Issue
Block a user