diff --git a/files/assets/js/chat.js b/files/assets/js/chat.js
index 220b2cec9..ffa627336 100644
--- a/files/assets/js/chat.js
+++ b/files/assets/js/chat.js
@@ -109,8 +109,8 @@ function send() {
function quote(t) {
text = t.previousElementSibling.innerHTML.replace(/>/g, "> ").replace(/\n/g, "\n> ").replace(/\*/g,"\\*")
let username
- try {username = t.parentElement.previousElementSibling.innerHTML}
- catch(e) {username = t.parentElement.parentElement.previousElementSibling.innerHTML}
+ try {username = t.parentElement.previousElementSibling.previousElementSibling.innerHTML}
+ catch(e) {username = t.parentElement.parentElement.previousElementSibling.previousElementSibling.innerHTML}
textbox.value = '> ' + text + '\n@' + username + ' '
textbox.focus()
autoExpand(textbox);
diff --git a/files/templates/chat.html b/files/templates/chat.html
index 15b2c69da..050a23fef 100644
--- a/files/templates/chat.html
+++ b/files/templates/chat.html
@@ -209,6 +209,6 @@
-
+