Skip to content

Commit 87c743c

Browse files
authored
Return uid for server
1 parent de198f4 commit 87c743c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function adapter(uri, opts){
9797
return debug('ignore different channel');
9898
}
9999
var args = JSON.parse(msg);
100-
var packet = args[0];
100+
var packet = args[1];
101101

102102
if (packet && packet.nsp === undefined) {
103103
packet.nsp = '/';
@@ -128,7 +128,7 @@ function adapter(uri, opts){
128128
newPacket.type = packet.type;
129129
if (!remote) {
130130
var chn = this.prefix + '#' + newPacket.nsp + '#';
131-
var msg = JSON.stringify([newPacket, opts]);
131+
var msg = JSON.stringify([uid, newPacket, opts]);
132132
if (opts.rooms) {
133133
opts.rooms.map( (room) => {
134134
var chnRoom = chn + room + '#';

0 commit comments

Comments
 (0)