fix expanded images in chat

pull/124/head
Aevann 2023-02-18 18:08:48 +02:00
parent c1c6c06547
commit 4615e4138d
1 changed files with 4 additions and 2 deletions

View File

@ -127,8 +127,6 @@ socket.on('speak', function(json) {
}
let line = document.getElementsByClassName('chat-line')[0].cloneNode(true)
register_new_elements(line);
bs_trigger(line)
if (last_user == json['user_id']) {
box.querySelector('.chat-group:last-child').append(line)
}
@ -138,6 +136,10 @@ socket.on('speak', function(json) {
box.append(chatgroup)
}
const line2 = document.getElementById(json['id'])
register_new_elements(line2);
bs_trigger(line2)
if (scrolled_down || json['user_id'] == vid)
box.scrollTo(0, box.scrollHeight)
})