Allow "createroom" to be accessed without account

A new one will be generated. Issue #67.
This commit is contained in:
N-Pex 2021-05-21 16:27:39 +02:00
parent 0e41f1dec4
commit 878c60f4a1
6 changed files with 213 additions and 51 deletions

View file

@ -269,6 +269,19 @@ export default {
})
},
/**
* Returns a promise that will log us into the Matrix.
*
* Will use a real account, if we have one, otherwise will create
* a random account.
*/
getLoginPromise() {
if (this.ready) {
return Promise.resolve(this.currentUser);
}
return this.$store.dispatch("login", this.currentUser || new User(config.defaultServer, "", "", true));
},
addMatrixClientListeners(client) {
if (client) {
client.on("event", this.onEvent);