diff --git a/www/js/channel/channel.js b/www/js/channel/channel.js index ba4f433..fd72349 100644 --- a/www/js/channel/channel.js +++ b/www/js/channel/channel.js @@ -130,12 +130,6 @@ class channel{ //Store queue lock status this.queueLock = data.queueLock; - - //For each chat held in the chat buffer - for(let chat of data.chatBuffer){ - //Display the chat - this.chatBox.displayChat(chat); - } } /** diff --git a/www/js/channel/chat.js b/www/js/channel/chat.js index cae6fac..a8eb996 100644 --- a/www/js/channel/chat.js +++ b/www/js/channel/chat.js @@ -393,6 +393,16 @@ class chatBox{ handleClientInfo(data){ this.updateFlairSelect(data.flairList, data.user.flair); this.updateHighSelect(data.user.highLevel); + + //If the chatbox is empty + if(this.chatBuffer.childElementCount <= 0){ + //For each chat held in the chat buffer + for(let chat of data.chatBuffer){ + //Display the chat + this.displayChat(chat); + } + } + } /**