fix vote progress

This commit is contained in:
barisusakli
2015-09-25 15:30:45 -04:00
parent e2896ef6b9
commit f2f9000b70
2 changed files with 37 additions and 21 deletions

View File

@@ -142,13 +142,12 @@ module.exports = function(SocketPosts) {
return callback(err);
}
socket.emit('posts.' + command, result);
if (result && eventName) {
socket.emit('posts.' + command, result);
websockets.in(data.room_id).emit('event:' + eventName, result);
}
if (notification) {
if (result && notification) {
SocketPosts.sendNotificationToPostOwner(data.pid, socket.uid, notification);
}
callback();