summaryrefslogtreecommitdiff
path: root/public/common/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/common/client.js')
-rw-r--r--public/common/client.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/public/common/client.js b/public/common/client.js
index 23e434d..87dc698 100644
--- a/public/common/client.js
+++ b/public/common/client.js
@@ -231,7 +231,10 @@ function update_chat(chat_id, raw_date, user, message) {
}
function add_chat_line(time, user, message) {
let line = document.createElement("div")
- line.textContent = "[" + time + "] " + user + " \xbb " + message
+ if (user)
+ line.textContent = "[" + time + "] " + user + " \xbb " + message
+ else
+ line.textContent = "[" + time + "] " + message
chat.text_element.appendChild(line)
chat.text_element.scrollTop = chat.text_element.scrollHeight
}