diff --git a/src/components/RoomList.vue b/src/components/RoomList.vue
index e1452c4..8e01b44 100644
--- a/src/components/RoomList.vue
+++ b/src/components/RoomList.vue
@@ -15,7 +15,7 @@
+ :value="room" class="room-list-room">
{{
@@ -29,12 +29,12 @@
{{
$t("menu.join") }}
- {{
+ {{
$t("menu.ignore") }}
-
+
{{
@@ -181,16 +181,19 @@ export default {
return this.$matrix.isDirectRoom(room);
},
- roomChange(roomId) {
- if (roomId == null || roomId == undefined) {
+ roomChange(room) {
+ if (room == null || room == undefined) {
// Ignore, this is caused by "new room" etc.
return;
}
+ if (room.isServiceNoticeRoom && room.selfMembership === "invite") {
+ return; // Nothing should happen when click on invite to server notices room, just the "join" button is enabled.
+ }
this.$emit("close");
this.$navigation.push(
{
name: "Chat",
- params: { roomId: util.sanitizeRoomId(roomId) },
+ params: { roomId: util.sanitizeRoomId(room.roomId) },
},
-1
);
diff --git a/src/services/matrix.service.js b/src/services/matrix.service.js
index 09250d6..f342881 100644
--- a/src/services/matrix.service.js
+++ b/src/services/matrix.service.js
@@ -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();
},