Login on reload

To get a new access_token if the old one has expired. Should fix issue #36.
This commit is contained in:
N-Pex 2021-01-27 12:57:23 +01:00
parent 5645e32cf0
commit 933de4a2ec
5 changed files with 64 additions and 18 deletions

View file

@ -115,11 +115,7 @@ export default {
// Is it a full matrix user id? Modify a copy, so that the UI will still show the full ID.
var user = Object.assign({}, this.user);
if (user.username.startsWith('@') && user.username.includes(':')) {
const parts = user.username.split(":");
user.username = parts[0].substring(1);
user.server = "https://" + parts[1];
}
user.normalize();
this.loading = true;
this.$store.dispatch("auth/login", user).then(