Recognize server notification room in room list

Remove the "ignore" button, service notification room invites can't be rejected.
This commit is contained in:
N-Pex 2023-11-17 11:23:04 +01:00
parent 20dcf3668a
commit c6fcdb4fe5
2 changed files with 19 additions and 7 deletions

View file

@ -404,7 +404,16 @@ export default {
this.updateNotificationCount();
},
onRoom(ignoredroom) {
onRoom(room) {
if (room.selfMembership === "invite") {
this.matrixClient.getRoomTags(room.roomId).then(reply => {
if (Object.keys(reply.tags).includes("m.server_notice")) {
Vue.set(room, "isServiceNoticeRoom", true);
}
}).catch((error => {
console.error(error);
}))
}
this.reloadRooms();
this.updateNotificationCount();
},