diff --git a/app/javascript/chat/chat.jsx b/app/javascript/chat/chat.jsx index 36497f431..d48cb37bd 100644 --- a/app/javascript/chat/chat.jsx +++ b/app/javascript/chat/chat.jsx @@ -82,7 +82,9 @@ export default class Chat extends Component { memberFilterQuery: null, rerenderIfUnchangedCheck: null, }; - getAllMessages(chatOptions.activeChannelId, 0, this.receiveAllMessages); + if (chatOptions.activeChannelId) { + getAllMessages(chatOptions.activeChannelId, 0, this.receiveAllMessages); + } } componentDidMount() { diff --git a/app/javascript/src/utils/getUnopenedChannels.jsx b/app/javascript/src/utils/getUnopenedChannels.jsx index ecb4b5602..8db53cea9 100644 --- a/app/javascript/src/utils/getUnopenedChannels.jsx +++ b/app/javascript/src/utils/getUnopenedChannels.jsx @@ -42,6 +42,9 @@ class UnopenedChannelNotice extends Component { const number = document.getElementById('connect-number'); this.setState({ unopenedChannels }); if (unopenedChannels.length > 0) { + if (unopenedChannels[0].adjusted_slug === "@"+JSON.parse(window.currentUser).username) { + return; + } number.classList.remove('hidden'); number.innerHTML = unopenedChannels.length; document.getElementById('connect-link').href = '/connect/' + unopenedChannels[0].adjusted_slug;