@ -189,7 +189,7 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
};
Chats.switchChat = function(uid, username) {
if (!$('[component="chat/messages"]').length) {
if (!$('#content [component="chat/messages"]').length) {
return ajaxify.go('chats/' + utils.slugify(username));
}
@ -19,10 +19,6 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
});
socket.on('event:chats.receive', function(data) {
if (ajaxify.currentPage.match(/^chats/)) {
return;
var username = data.message.fromUser.username;
var isSelf = parseInt(data.message.fromUser.uid, 10) === parseInt(app.user.uid, 10);
data.message.self = data.self;