Merge branch 'http-only-support' into 'dev'

Support defaultServer with http-only connectivity

See merge request keanuapp/keanuapp-weblite!54
This commit is contained in:
N Pex 2022-03-04 11:34:16 +00:00
commit 0a4e7eaa79
2 changed files with 2 additions and 16 deletions

View file

@ -14,13 +14,6 @@ export default class User {
}
};
static homeServerUrl = function (home_server) {
if (home_server && !home_server.startsWith("https://")) {
return "https://" + home_server;
}
return home_server;
};
static localPart(user_id) {
if (user_id && user_id.startsWith('@') && user_id.includes(':')) {
const parts = user_id.split(":");

View file

@ -102,9 +102,7 @@ export default {
return new LocalStorageCryptoStore(this.$store.getters.storage);
},
login(user) {
const tempMatrixClient = sdk.createClient(
User.homeServerUrl(user.home_server)
);
const tempMatrixClient = sdk.createClient(user.home_server);
var promiseLogin;
const self = this;
@ -236,13 +234,8 @@ export default {
this.$store.getters.storage
);
var homeServer = user.home_server;
if (!homeServer.startsWith("https://")) {
homeServer = "https://" + homeServer;
}
var opts = {
baseUrl: homeServer,
baseUrl: user.home_server,
userId: user.user_id,
store: matrixStore,
sessionStore: webStorageSessionStore,