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:
commit
0a4e7eaa79
2 changed files with 2 additions and 16 deletions
|
|
@ -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(":");
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue