diff --git a/frontend/src/components/TwitchChat.vue b/frontend/src/components/TwitchChat.vue index 717bda8..4742c4f 100644 --- a/frontend/src/components/TwitchChat.vue +++ b/frontend/src/components/TwitchChat.vue @@ -27,9 +27,12 @@ export default { }, mounted() { const chatList = this.$refs.chatList as Element + const chatStatusMessage = this.$refs.initConnectingStatus as Element this.ws.onmessage = (message) => { - if (message.data !== 'OK') { + if (message.data == 'OK') { + chatStatusMessage.textContent = `Connected to ${this.channelName}` + } else { this.messages.push(JSON.parse(message.data)) this.scrollToBottom(chatList) } @@ -37,7 +40,7 @@ export default { this.ws.onopen = (data) => { console.log(data) - this.ws.send('JOIN ' + this.props.channelName) + this.ws.send('JOIN ' + this.props.channelName?.toLowerCase()) } }, methods: { @@ -51,8 +54,11 @@ export default { }