socket.io-mongodb
socket.io-mongodb copied to clipboard
BUGFIX: pubsub subscription should be unique per channelName
Currently MongoAdapter.prototype.add() subscribes the adaptor for every user joining the channel, which is wrong. As a consequence, when multiple users join a room, MongoAdapter.prototype.onmessage() is called for every message - and for every user - causing multiple broadcast of the same message.
@marcoancona: apologies, I missed the notification of this PR, and just noticed it when answering an Issue/Question. Would you mind providing a unit test for this in socketio-mongodb.fixture.js?