You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
473 B
JavaScript

define('persona/chats', ['components', 'forum/chats'], function(components, coreChats) {
var Chats = {};
Chats.init = function() {
components.get('chat/recent').off('click').on('click', '[component="chat/recent/room"]', function(e) {
var env = utils.findBootstrapEnvironment();
if (env === 'xs' || env === 'sm') {
app.openChat($(this).attr('data-roomid'));
} else {
coreChats.switchChat($(this).attr('data-roomid'));
}
});
};
return Chats;
});