From 5c7bf97995ed71fd71f29e772162a293acbe16f5 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Mon, 20 May 2019 15:47:06 +0200 Subject: [PATCH] Cleanup - removed refreshChat logging in browser - fixed indentation --- public/javascripts/bingo-web.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/bingo-web.js b/public/javascripts/bingo-web.js index 15c4651..3f95969 100644 --- a/public/javascripts/bingo-web.js +++ b/public/javascripts/bingo-web.js @@ -549,11 +549,12 @@ function addChatMessage(messageObject, player) { msgSpan.setAttribute('class', 'chatMessage'); msgSpan.setAttribute('msg-type', messageObject.type); msgSpan.setAttribute('msg-id', messageObject.id); + if (messageObject.type === "USER") msgSpan.innerHTML = ` ${messageObject.author.username}: ${messageObject.htmlContent}`; - else + else msgSpan.innerHTML = ` ${messageObject.htmlContent}`; @@ -622,7 +623,6 @@ async function refreshChat() { showError('Failed to refresh messages'); console.error(err); } - console.log('Refresh Chat'); } /**