1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Add setIdentityServerUrl

Hopefully fairly self explanatory. The ID server URL can be changed
fairly readily, whereas the HS URL would require a different access
token etc.
This commit is contained in:
David Baker
2019-08-09 18:05:37 +01:00
parent 05d77a85c9
commit 4c6d11d9ed
4 changed files with 27 additions and 9 deletions

View File

@@ -117,6 +117,15 @@ MatrixBaseApis.prototype.getIdentityServerUrl = function(stripProto=false) {
return this.idBaseUrl;
};
/**
* Set the Identity Server URL of this client
* @param {string} url New Identity Server URL
*/
MatrixBaseApis.prototype.setIdentityServerUrl = function(url) {
this.idBaseUrl = utils.ensureNoTrailingSlash(url);
this._http.setIdBaseUrl(this._idBaseUrl);
};
/**
* Get the access token associated with this account.
* @return {?String} The access_token or null