Node.js based forum software built for the modern web
fix: if you send message scrollToBottom
Barış Soner Uşaklı223c85e44e29
diff --git a/public/src/client/chats/messages.js b/public/src/client/chats/messages.jsindex 864b6e0604..fc875fea04 100644--- a/public/src/client/chats/messages.js+++ b/public/src/client/chats/messages.js@@ -85,16 +85,16 @@ define('forum/chats/messages', [}messages.parseMessage(data, function (html) {- onMessagesParsed(chatContentEl, html);+ onMessagesParsed(chatContentEl, html, data);});};- function onMessagesParsed(chatContentEl, html) {+ function onMessagesParsed(chatContentEl, html, msgData) {const newMessage = $(html);const isAtBottom = messages.isAtBottom(chatContentEl);newMessage.appendTo(chatContentEl);messages.onMessagesAddedToDom(newMessage);- if (isAtBottom) {+ if (isAtBottom || msgData.self) {messages.scrollToBottom(chatContentEl);// remove some message elements if there are too manyconst chatMsgEls = chatContentEl.find('[data-mid]');