fix: chat fix

This commit is contained in:
Barış Soner Uşaklı
2023-01-12 16:14:16 -05:00
parent 32cad6dc82
commit 5991727f42
2 changed files with 3 additions and 3 deletions

View File

@@ -524,8 +524,8 @@ define('forum/chats', [
$('[data-roomid="' + ajaxify.data.roomId + '"]').toggleClass('unread', false);
$('.expanded-chat [component="chat/input"]').focus();
}
$('.chats-list li').removeClass('bg-info');
$('.chats-list li[data-roomid="' + ajaxify.data.roomId + '"]').addClass('bg-info');
$('.chats-list li').removeClass('active');
$('.chats-list li[data-roomid="' + ajaxify.data.roomId + '"]').addClass('active');
components.get('chat/nav-wrapper').attr('data-loaded', ajaxify.data.roomId ? '1' : '0');
};

View File

@@ -141,7 +141,7 @@ Messaging.getRecentChats = async (callerUid, uid, start, stop) => {
Messaging.generateUsernames = function (users, excludeUid) {
users = users.filter(u => u && parseInt(u.uid, 10) !== excludeUid);
const usernames = users.map(u => u.username);
if (users.length > 2) {
if (users.length > 3) {
return translator.compile(
'modules:chat.usernames-and-x-others',
usernames.slice(0, 2).join(', '),