Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

excluded members, when added to a group, are no longer excluded.

  • Loading branch information...
commit 0bc0dee40a72f722fbc9c61dfeb75e054e516d25 1 parent 60f0221
@steveWang steveWang authored
View
5 lib/group.js
@@ -120,6 +120,9 @@ exports.initialize = function (nowjs) {
if (hasClient) {
return;
}
+ if (self.excludes[clientId]) {
+ self.excludes[clientId] = false;
+ }
nowjs.getClient(clientId, function () {
// Scoping note: `self` refers to the group, `this` refers to
// the new client.
@@ -243,7 +246,7 @@ exports.initialize = function (nowjs) {
Group.prototype.exclude = function (clientIds) {
var excludes = {};
if(typeof clientIds === 'string') {
- excludes[clientIds] = true;
+ return this.exclude([clientIds]);
} else {
for (var i = 0; i < clientIds.length; i++) {
excludes[clientIds[i]] = true;
View
6 lib/handlers.js
@@ -24,8 +24,10 @@ exports.initialize = function (nowjs) {
function replaceVar(group, fqn, val) {
var exclusive = false;
for (var j in group.excludes) {
- exclusive = true;
- break;
+ if (group.excludes[j]) {
+ exclusive = true;
+ break;
+ }
}
var users = Object.keys(group.users);
var i = 0, ll = users.length;
View
3  lib/server.js
@@ -2,8 +2,7 @@ var nowUtil = require('./nowUtil').nowUtil;
var Now = require('./now').Now;
process.on('uncaughtException', function (err) {
- console.log(err.message);
- console.log(err.stack);
+ nowUtil.error(err);
});
module.exports = new Now();
View
2  package.json
@@ -13,7 +13,7 @@
},
"dependencies": {
"socket.io": ">= 0.7.7",
- "node-proxy": "0.4.0"
+ "node-proxy": ">= 0.4.0"
},
"devDependencies": {}
}
Please sign in to comment.
Something went wrong with that request. Please try again.