more socket user tests

This commit is contained in:
barisusakli
2016-12-01 18:59:24 +03:00
parent c3980d0c2e
commit 7f90e31a38
3 changed files with 52 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ SocketUser.deleteAccount = function (socket, data, callback) {
user.deleteAccount(socket.uid, next);
},
function (next) {
socket.broadcast.emit('event:user_status_change', {uid: socket.uid, status: 'offline'});
require('./index').server.sockets.emit('event:user_status_change', {uid: socket.uid, status: 'offline'});
events.log({
type: 'user-delete',