diff --git a/README.md b/README.md index 04bb34e..525bb3b 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ The app loads runtime configutation from the server at "./config.json" and merge * **accentColor** - The accent color of the app UI. Use a HTML-style color value string, like "#ff0080". * **show_status_messages** - Whether to show only user joins/leaves and display name updates, or the full range of room status updates. Possible values are "never" (only the above), "moderators" (moderators will see all status updates) or "always" (everyone will see all status updates). Defaults to "always". * **maxSizeAutoDownloads** - Attachments smaller than this will be auto downloaded. Default is 10Mb. -* **auto_join_rooms** - Whether to show the normal "join" screen or just auto join the user to the room link. Default to false. ### Sticker short codes - To enable sticker short codes, follow these steps: * Run the "create sticker config" script using "npm run create-sticker-config " diff --git a/src/components/Chat.vue b/src/components/Chat.vue index 80f8d8a..b165bcb 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -1055,7 +1055,7 @@ export default { this.$navigation.push( { name: "Join", - params: { roomId: util.sanitizeRoomId(this.roomAliasOrId) }, + params: { roomId: util.sanitizeRoomId(this.roomAliasOrId), join: this.$route.params.join }, }, 0 ); diff --git a/src/components/Join.vue b/src/components/Join.vue index 7bf3e52..1b82b44 100644 --- a/src/components/Join.vue +++ b/src/components/Join.vue @@ -306,7 +306,7 @@ export default { return roomName ? roomName : ""; }, getRoomInfo() { - if (this.$config.auto_join_rooms) { + if (this.$route.params.join) { // Auto-join room this.waitingForRoomCreation = true; this.$nextTick(() => { diff --git a/src/components/messages/ContactJoin.vue b/src/components/messages/ContactJoin.vue index ec89512..d8aa6d8 100644 --- a/src/components/messages/ContactJoin.vue +++ b/src/components/messages/ContactJoin.vue @@ -1,14 +1,6 @@ @@ -18,19 +10,6 @@ import messageMixin from "./messageMixin"; export default { mixins: [messageMixin], - methods: { - viewProfile() { - this.$navigation.push({ name: "Profile" }, 1); - }, - roomCreatedByYou() { - const createEvent = this.room && this.room.currentState.getStateEvents("m.room.create", ""); - if (createEvent) { - const creatorId = createEvent.getContent().creator; - return (creatorId == this.$matrix.currentUserId); - } - return false; - }, - } }; diff --git a/src/components/roomInfoMixin.js b/src/components/roomInfoMixin.js index b8796a6..a8752c9 100644 --- a/src/components/roomInfoMixin.js +++ b/src/components/roomInfoMixin.js @@ -1,4 +1,4 @@ -import utils from "../plugins/utils"; +import utils, { ROOM_TYPE_CHANNEL } from "../plugins/utils"; import roomTypeMixin from "./roomTypeMixin"; export default { @@ -96,7 +96,8 @@ export default { this.room.getCanonicalAlias(), this.room.roomId, this.room.name, - utils.roomDisplayTypeToQueryParam(this.room, this.roomDisplayType) + utils.roomDisplayTypeToQueryParam(this.room, this.roomDisplayType), + this.roomDisplayType == ROOM_TYPE_CHANNEL /* Auto join for channels */ ); } return null; diff --git a/src/components/welcome_headers/WelcomeHeaderChannelUser.vue b/src/components/welcome_headers/WelcomeHeaderChannelUser.vue index 943f0e0..be9257b 100644 --- a/src/components/welcome_headers/WelcomeHeaderChannelUser.vue +++ b/src/components/welcome_headers/WelcomeHeaderChannelUser.vue @@ -1,6 +1,6 @@