From 721e80aa1fcbfa460ef84cda1629618c4e8394ae Mon Sep 17 00:00:00 2001 From: Hexagon Date: Mon, 23 Jan 2017 22:29:23 +0100 Subject: [PATCH] Adhering to change in socket.io, Release 1.1.16 --- .gitignore | 3 +++ package.json | 2 +- server.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0efe000..f9177ce 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ node_modules # Users Environment Variables .lock-wscript docs/Thumbs.db + +# Vim temp files +*.swp diff --git a/package.json b/package.json index a9d4c13..4d4a036 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name" : "cryptalk", - "version" : "1.1.15", + "version" : "1.1.16", "description" : "Encrypted HTML5/Node.JS instant chat", "main" : "server.js", "subdomain": "cryptalk", diff --git a/server.js b/server.js index 91215a1..ce6efa9 100644 --- a/server.js +++ b/server.js @@ -53,7 +53,7 @@ io.on('connection', function(socket) { socket.on('room:count', function (req) { if( socket.current_room !== undefined ) { var clientsList = io.sockets.adapter.rooms[socket.current_room]; - socket.emit('message:server', {msg:'person_count', payload: Object.keys(clientsList).length } ); + socket.emit('message:server', {msg:'person_count', payload: clientsList.length } ); } else { socket.emit('message:server', {msg:'command_failed'} ); }