This commit is contained in:
Timothy Jaeryang Baek 2024-12-26 21:55:21 -08:00
parent 6ff6d57507
commit 7fa60dd63e

View File

@ -65,6 +65,11 @@
if (type === 'message') {
console.log('message', data);
messages = [data, ...messages];
if (typingUsers.find((user) => user.id === event.user.id)) {
typingUsers = typingUsers.filter((user) => user.id !== event.user.id);
}
await tick();
if (scrollEnd) {
messagesContainerElement.scrollTop = messagesContainerElement.scrollHeight;