You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-12 08:42: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} address The address for the specified medium.
|
||||||
* @param {string} displayName The human-readable name to show in the room for
|
* @param {string} displayName The human-readable name to show in the room for
|
||||||
* this invite. MUST NOT be the address.
|
* 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.
|
* @param {module:client.callback} callback Optional.
|
||||||
* @return {module:client.Promise} Resolves: TODO
|
* @return {module:client.Promise} Resolves: TODO
|
||||||
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
* @throws If <code>displayName</code> contains the <code>address</code>.
|
* @throws If <code>displayName</code> contains the <code>address</code>.
|
||||||
*/
|
*/
|
||||||
MatrixClient.prototype.inviteByThreePid = function(roomId, medium, address,
|
MatrixClient.prototype.inviteByThreePid = function(roomId, medium, address,
|
||||||
displayName, idServer, callback) {
|
displayName, callback) {
|
||||||
if (utils.isFunction(idServer)) { callback = idServer; idServer = undefined; }
|
|
||||||
idServer = idServer || this.getIdentityServerUrl();
|
|
||||||
if (displayName && displayName.indexOf(address) >= 0) {
|
if (displayName && displayName.indexOf(address) >= 0) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"The display name contains the address. This leaks the 3PID " +
|
"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, {
|
return this._http.authedRequest(callback, "POST", path, undefined, {
|
||||||
id_server: idServer,
|
id_server: this.getIdentityServerUrl(),
|
||||||
medium: medium,
|
medium: medium,
|
||||||
address: address,
|
address: address,
|
||||||
display_name: displayName
|
display_name: displayName
|
||||||
|
Reference in New Issue
Block a user