diff --git a/files/assets/js/chat.js b/files/assets/js/chat.js index 3b2959c8ba..3661de299f 100644 --- a/files/assets/js/chat.js +++ b/files/assets/js/chat.js @@ -174,13 +174,13 @@ function send() { function quote(t) { document.getElementById("quotes").classList.remove("d-none") - const text = t.parentElement.getElementsByClassName("text")[0].innerHTML.replace(/\*/g,"\\*").split('\n').pop() + const text = t.parentElement.parentElement.getElementsByClassName("text")[0].innerHTML.replace(/\*/g,"\\*").split('\n').pop() document.getElementById('QuotedMessage').innerHTML = text - const username = t.parentElement.parentElement.parentElement.parentElement.getElementsByClassName('userlink')[0].textContent + const username = t.parentElement.parentElement.parentElement.parentElement.parentElement.getElementsByClassName('userlink')[0].textContent document.getElementById('QuotedUser').innerHTML = username - const id = t.parentElement.parentElement.parentElement.id + const id = t.parentElement.parentElement.parentElement.parentElement.id document.getElementById('quotes_id').value = id document.getElementById('QuotedMessageLink').href = `#${id}` @@ -256,7 +256,7 @@ socket.on('typing', function (users){ function del(t) { - const chatline = t.parentElement.parentElement.parentElement + const chatline = t.parentElement.parentElement.parentElement.parentElement socket.emit('delete', chatline.id); chatline.remove() } diff --git a/files/templates/chat.html b/files/templates/chat.html index ee8c81c902..6823bade3f 100644 --- a/files/templates/chat.html +++ b/files/templates/chat.html @@ -29,7 +29,7 @@ {% set mentioned = m and vlink in m['text_html'] or (quote_exists and messages[m['quotes']]['user_id'] == v.id) %}