Don't remove room from store on leave

This commit is contained in:
N Pex 2023-03-16 08:17:29 +00:00 committed by n8fr8
parent 6146dbeca8
commit f34721c930
5 changed files with 120 additions and 641 deletions

View file

@ -103,7 +103,7 @@ export default {
return new LocalStorageCryptoStore(this.$store.getters.storage);
},
login(user) {
const tempMatrixClient = sdk.createClient(user.home_server);
const tempMatrixClient = sdk.createClient({baseUrl: user.home_server});
var promiseLogin;
const self = this;
@ -492,10 +492,11 @@ export default {
leaveRoom(roomId) {
return this.matrixClient.leave(roomId, undefined).then(() => {
this.$store.commit("setCurrentRoomId", null);
this.rooms = this.rooms.filter((room) => {
room.roomId != roomId;
});
this.matrixClient.store.removeRoom(roomId);
//this.matrixClient.store.removeRoom(roomId);
//this.matrixClient.forget(roomId, true, undefined);
});
},