You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
consume trailing slash when creating Matrix Client in HS and IS urls
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -113,6 +113,16 @@ try {
|
|||||||
* crypto store implementation.
|
* crypto store implementation.
|
||||||
*/
|
*/
|
||||||
function MatrixClient(opts) {
|
function MatrixClient(opts) {
|
||||||
|
// Allow trailing slash in HS url
|
||||||
|
if (opts.baseUrl && opts.baseUrl.endsWith("/")) {
|
||||||
|
opts.baseUrl = opts.baseUrl.substr(0, opts.baseUrl.length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow trailing slash in IS url
|
||||||
|
if (opts.idBaseUrl && opts.idBaseUrl.endsWith("/")) {
|
||||||
|
opts.idBaseUrl = opts.idBaseUrl.substr(0, opts.idBaseUrl.length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
MatrixBaseApis.call(this, opts);
|
MatrixBaseApis.call(this, opts);
|
||||||
|
|
||||||
this.store = opts.store || new StubStore();
|
this.store = opts.store || new StubStore();
|
||||||
|
|||||||
Reference in New Issue
Block a user