diff --git a/frontend/views/containers/chatroom/ChatMixin.js b/frontend/views/containers/chatroom/ChatMixin.js index 9aa4f6aea..7ce89663a 100644 --- a/frontend/views/containers/chatroom/ChatMixin.js +++ b/frontend/views/containers/chatroom/ChatMixin.js @@ -80,15 +80,21 @@ const ChatMixin: Object = { }, methods: { redirectChat (chatRoomID: string) { - const name = 'GroupChatConversation' // Temporarily blocked the chatrooms which the user is not part of // Need to open it later and display messages just like Slack - chatRoomID = chatRoomID || (this.isJoinedChatRoom(this.currentChatRoomId) ? this.currentChatRoomId : this.groupGeneralChatRoomId) + + // NOTE: for better understanding created a variable `shouldUseAlternative` instead of using !chatRoomID. + // to skip passing `chatRoomID` parameter means an intention to redirect to another chatroom + // this happens when the wrong (or cannot accessable) chatRoomID is used while opening group-chat URL + const shouldUseAlternative = !chatRoomID + if (shouldUseAlternative) { + chatRoomID = this.isJoinedChatRoom(this.currentChatRoomId) ? this.currentChatRoomId : this.groupGeneralChatRoomId + } this.$router.push({ - name, + name: 'GroupChatConversation', params: { chatRoomID }, - query: { ...this.$route.query } + query: !shouldUseAlternative ? { ...this.$route.query } : {} }).catch(logExceptNavigationDuplicated) }, refreshTitle (title?: string): void { diff --git a/frontend/views/containers/chatroom/PinnedMessages.vue b/frontend/views/containers/chatroom/PinnedMessages.vue index 86992c156..00a391089 100644 --- a/frontend/views/containers/chatroom/PinnedMessages.vue +++ b/frontend/views/containers/chatroom/PinnedMessages.vue @@ -306,7 +306,11 @@ export default { .c-pinned-message-content { margin: 0.5rem 0; - word-break: break-word; + + .c-text { + white-space: pre-line; + word-break: break-word; + } .c-poll-inner { position: relative; diff --git a/frontend/views/containers/group-settings/InvitationsTable.vue b/frontend/views/containers/group-settings/InvitationsTable.vue index 549a94c84..c0bbb83b5 100644 --- a/frontend/views/containers/group-settings/InvitationsTable.vue +++ b/frontend/views/containers/group-settings/InvitationsTable.vue @@ -288,10 +288,14 @@ export default ({ } }, showRevokeLinkMenu (inviteItem) { - return inviteItem.isAnyoneLink - ? this.isUserGroupCreator && - this.groupShouldPropose // 'Anyone' link must only be revokable when the group size is >= 3 (context: https://github.com/okTurtles/group-income/issues/1670) - : inviteItem.status.isActive + if (inviteItem.status.isActive) { + if (inviteItem.isAnyoneLink) { + // 'Anyone' link must only be revokable when the group size is >= 3 (context: https://github.com/okTurtles/group-income/issues/1670) + return this.isUserGroupCreator && this.groupShouldPropose + } + return true + } + return false }, handleInviteClick (e) { if (e.target.classList.contains('js-btnInvite')) {