watch unwatch

update on toggle, moved isFollowing to api return and template
This commit is contained in:
barisusakli
2014-09-25 16:45:56 -04:00
parent b27af65f18
commit 5f55cc947c
5 changed files with 25 additions and 18 deletions

View File

@@ -199,7 +199,6 @@ Sockets.init = function(server) {
});
socket.on('*', function(payload, callback) {
function callMethod(method) {
method.call(null, socket, payload.args.length ? payload.args[0] : null, function(err, result) {
if (callback) {
@@ -279,10 +278,7 @@ Sockets.uidInRoom = function(uid, room) {
Sockets.getSocketCount = function() {
var clients = io.sockets.manager.rooms[''];
if (!Array.isArray(clients)) {
return 0;
}
return clients.length;
return Array.isArray(clients) ? clients.length : 0;
};
Sockets.getConnectedClients = function() {