Fix delete room

This commit is contained in:
N-Pex 2025-06-19 12:12:40 +02:00
parent 422e856cd9
commit 10b4c8ac35
2 changed files with 30 additions and 41 deletions

View file

@ -860,7 +860,6 @@ export default {
});
};
const oldGlobalErrorSetting = this.matrixClient.getGlobalErrorOnUnknownDevices();
return new Promise((resolve, reject) => {
const room = this.getRoom(roomId);
if (!room) {
@ -925,8 +924,6 @@ export default {
.then(() => {
//console.log("Purge: redact events");
statusCallback(this.$t("room.purge_redacting_events"));
// First ignore unknown device errors
this.matrixClient.setGlobalErrorOnUnknownDevices(false);
const allEvents = timelineWindow.getEvents().filter((event) => {
return (
!event.isRedacted() &&
@ -1004,7 +1001,6 @@ export default {
})
.then(() => {
statusCallback(null);
this.matrixClient.setGlobalErrorOnUnknownDevices(oldGlobalErrorSetting);
return withRetry(() => this.leaveRoom(roomId));
})
.then(() => {
@ -1014,7 +1010,6 @@ export default {
.catch((err) => {
console.error("Error purging room", err);
this.currentRoomBeingPurged = false;
this.matrixClient.setGlobalErrorOnUnknownDevices(oldGlobalErrorSetting);
reject(err);
});
});
@ -1363,13 +1358,16 @@ export default {
},
render: () => {}
});
const t = options.i18n.global.t;
matrixService.config.globalProperties.$store = store;
matrixService.config.globalProperties.$config = app.$config;
matrixService.config.globalProperties.$t = app.$t;
matrixService.config.globalProperties.$t = t;
matrixService.config.globalProperties.$navigation = app.$navigation;
matrixService.$store = store;
matrixService.$config = app.$config;
matrixService.$t = app.$t;
matrixService.$t = t;
matrixService.$navigation = app.$navigation;
const instance = matrixService.mount("#app2");
app.config.globalProperties.$matrix = instance;