moved chat socket.on to footer

v1.18.x
Baris Soner Usakli 12 years ago
parent 3bd9be5656
commit 99465f1ffd

@ -132,7 +132,20 @@
socket.emit('api:notifications.hasFlag'); socket.emit('api:notifications.hasFlag');
socket.on('chatMessage', function(data) {
var username = data.username;
var fromuid = data.fromuid;
var message = data.message;
require(['chat'], function(chat) {
var chatModal = chat.createModalIfDoesntExist(username, fromuid);
chatModal.show();
chat.bringModalToTop(chatModal);
chat.appendChatMessage(chatModal, message);
});
});
require(['mobileMenu'], function(mobileMenu) { require(['mobileMenu'], function(mobileMenu) {

@ -261,22 +261,6 @@
}); });
socket.on('chatMessage', function(data) {
var username = data.username;
var fromuid = data.fromuid;
var message = data.message;
require(['chat'], function(chat) {
var chatModal = chat.createModalIfDoesntExist(username, fromuid);
chatModal.show();
chat.bringModalToTop(chatModal);
chat.appendChatMessage(chatModal, message);
});
});
ajaxify.register_events([ ajaxify.register_events([
'event:rep_up', 'event:rep_down', 'event:new_post', 'api:get_users_in_room', 'event:rep_up', 'event:rep_down', 'event:new_post', 'api:get_users_in_room',
'event:topic_deleted', 'event:topic_restored', 'event:topic:locked', 'event:topic_deleted', 'event:topic_restored', 'event:topic:locked',

Loading…
Cancel
Save