socket.io-redis
Advanced tools
Comparing version 1.1.0 to 1.1.1
1.1.1 / 2016-09-26 | ||
================== | ||
* [refactor] Use this.channel to construct the name of a channel (#129) | ||
* [test] Add tests with ioredis client (#128) | ||
* [chore] Restrict files included in npm package (#130) | ||
1.1.0 / 2016-09-24 | ||
@@ -3,0 +10,0 @@ ================== |
20
index.js
@@ -190,11 +190,11 @@ | ||
if (!remote) { | ||
var chn = prefix + '#' + packet.nsp + '#'; | ||
var self = this; | ||
var msg = msgpack.encode([uid, packet, opts]); | ||
if (opts.rooms) { | ||
opts.rooms.forEach(function(room) { | ||
var chnRoom = chn + room + '#'; | ||
var chnRoom = self.channel + room + '#'; | ||
pub.publish(chnRoom, msg); | ||
}); | ||
} else { | ||
pub.publish(chn, msg); | ||
pub.publish(self.channel, msg); | ||
} | ||
@@ -218,3 +218,3 @@ } | ||
Adapter.prototype.add.call(this, id, room); | ||
var channel = prefix + '#' + this.nsp.name + '#' + room + '#'; | ||
var channel = this.channel + room + '#'; | ||
sub.subscribe(channel, function(err){ | ||
@@ -247,3 +247,3 @@ if (err) { | ||
if (hasRoom && !this.rooms[room]) { | ||
var channel = prefix + '#' + this.nsp.name + '#' + room + '#'; | ||
var channel = this.channel + room + '#'; | ||
sub.unsubscribe(channel, function(err){ | ||
@@ -326,3 +326,8 @@ if (err) { | ||
subJson.on('subscribe', function subscribed(channel, count) { | ||
subJson.subscribe(responseChn, function(err) { | ||
if (err) { | ||
self.emit('error', err); | ||
if (fn) fn(err); | ||
return; | ||
} | ||
@@ -358,3 +363,2 @@ var request = JSON.stringify({ | ||
subJson.unsubscribe(responseChn); | ||
subJson.removeListener('subscribe', subscribed); | ||
subJson.removeListener(subEvent, onEvent); | ||
@@ -370,4 +374,2 @@ | ||
subJson.subscribe(responseChn); | ||
}); | ||
@@ -374,0 +376,0 @@ |
{ | ||
"name": "socket.io-redis", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "", | ||
@@ -10,2 +10,5 @@ "license": "MIT", | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"scripts": { | ||
@@ -23,7 +26,8 @@ "test": "mocha" | ||
"devDependencies": { | ||
"expect.js": "0.3.1", | ||
"ioredis": "2.4.0", | ||
"mocha": "1.18.0", | ||
"socket.io": "socketio/socket.io", | ||
"socket.io-client": "socketio/socket.io-client", | ||
"mocha": "1.18.0", | ||
"expect.js": "0.3.1" | ||
"socket.io-client": "socketio/socket.io-client" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
16235
5
5
302