You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
add parameter to getIdentityServerUrl to strip the protocol for invites
use new getIdentityServerUrl param in inviteByThreePid
This commit is contained in:
@@ -89,9 +89,14 @@ MatrixBaseApis.prototype.getHomeserverUrl = function() {
|
||||
|
||||
/**
|
||||
* Get the Identity Server URL of this client
|
||||
* @param {boolean} stripProto whether or not to strip the protocol from the URL
|
||||
* @return {string} Identity Server URL of this client
|
||||
*/
|
||||
MatrixBaseApis.prototype.getIdentityServerUrl = function() {
|
||||
MatrixBaseApis.prototype.getIdentityServerUrl = function(stripProto=false) {
|
||||
if (stripProto && (this.idBaseUrl.startsWith("http://") ||
|
||||
this.idBaseUrl.startsWith("https://"))) {
|
||||
return this.idBaseUrl.split("://")[1];
|
||||
}
|
||||
return this.idBaseUrl;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user