mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
Merge branch 'pichalite-new-chat-message'
This commit is contained in:
@@ -56,8 +56,8 @@
|
||||
"nodebb-plugin-spam-be-gone": "0.4.6",
|
||||
"nodebb-rewards-essentials": "0.0.8",
|
||||
"nodebb-theme-lavender": "3.0.9",
|
||||
"nodebb-theme-persona": "4.0.121",
|
||||
"nodebb-theme-vanilla": "5.0.65",
|
||||
"nodebb-theme-persona": "4.0.122",
|
||||
"nodebb-theme-vanilla": "5.0.66",
|
||||
"nodebb-widget-essentials": "2.0.9",
|
||||
"nodemailer": "2.0.0",
|
||||
"nodemailer-sendmail-transport": "1.0.0",
|
||||
@@ -115,4 +115,4 @@
|
||||
"url": "https://github.com/barisusakli"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,6 +366,23 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
||||
data.message.self = data.self;
|
||||
|
||||
Chats.appendChatMessage($('.expanded-chat .chat-content'), data.message);
|
||||
} else {
|
||||
if (ajaxify.currentPage.startsWith("chats")) {
|
||||
var roomEl = $('[data-roomid=' + data.roomId + ']');
|
||||
|
||||
if (roomEl.length > 0) {
|
||||
roomEl.addClass("unread");
|
||||
} else {
|
||||
var recentEl = components.get('chat/recent');
|
||||
templates.parse('partials/chat_recent_room', {
|
||||
rooms: { "roomId": data.roomId, "lastUser": data.message.fromUser, "usernames": data.message.fromUser.username, "unread": true }
|
||||
}, function(html) {
|
||||
translator.translate(html, function(translated) {
|
||||
recentEl.prepend(translated);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user