Node.js based forum software built for the modern web
Fix bug with missing ref, using pushState instead of replaceState in chats client-side lib
Julian Lamcef8e44b3b0f
diff --git a/public/src/client/chats.js b/public/src/client/chats.jsindex d34b47667f..8c767a4548 100644--- a/public/src/client/chats.js+++ b/public/src/client/chats.js@@ -119,9 +119,11 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',ajaxify.go('chats/' + username);}+ var contactEl = $('.chats-list [data-uid="' + uid + '"]');+Chats.loadChatSince(uid, $('.chat-content'), 'recent');Chats.addSendHandlers(uid, $('[component="chat/input"]'), $('[data-action="send"]'));- $(this).addClass('bg-primary').siblings().removeClass('bg-primary');+ contactEl.addClass('bg-primary').siblings().removeClass('bg-primary');$('[component="chat/title"]').text(username);$('[component="chat/messages"]').attr('data-uid', uid).attr('data-username', username);$('[component="breadcrumb/current"]').text(username);@@ -129,7 +131,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',if (window.history && window.history.pushState) {var url = 'chats/' + utils.slugify(username);- window.history.replaceState({+ window.history.pushState({url: url}, url, RELATIVE_PATH + '/' + url);}