Skip to content

Commit

Permalink
remove old prop from socket.emit
Browse files Browse the repository at this point in the history
  • Loading branch information
annyhe committed Nov 9, 2016
1 parent 1982d90 commit 5777979
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion realtime/socketIOEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ module.exports = (io, key, mssgObj) => {
}
for (const nsp in io.nsps) {
if (nsp && rtUtils.shouldIEmitThisObj(nsp, obj)) {
io.of(nsp).emit(key, JSON.stringify(mssgObj));
// obj contains only the newest values
io.of(nsp).emit(key, JSON.stringify({ key: obj }));
}
}
};

0 comments on commit 5777979

Please sign in to comment.