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

@@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -699,3 +700,11 @@ module.exports.globToRegexp = function(glob, extended) {
}
return pat;
};
module.exports.ensureNoTrailingSlash = function(url) {
if (url && url.endsWith("/")) {
return url.substr(0, url.length - 1);
} else {
return url;
}
};