lklepner / socket.io-adapter-mongo

MIT License
11 stars 8 forks source link

It doesn't work with socket.io 2.x.x #2

Closed ctretyak closed 6 years ago

ctretyak commented 7 years ago

There is an error "TypeError: this.adapter.addAll is not a function"

lklepner commented 7 years ago

I haven't delved into socket.io 2.x and don't foresee doing so in the coming weeks/months.

If you would like to take this on I would gladly accept a PR

amcdnl commented 7 years ago

I think the socket.io-adapter just needs to be bumped to support this. https://github.com/socketio/socket.io-adapter

lklepner commented 7 years ago

This is a breaking change since socket.io-adapter 1.0.x requires socket.io v2 or later.

Would one of you like to prepare a socket.io-adapter-mongo v2.0.0 PR?

I wonder if socket.io-mongodb-emitter will need to be updated for socket.io v2 as well - https://github.com/ramkumarc/socket.io-mongodb-emitter

MickL commented 7 years ago

I got stuck here, too. I don't understand most of this adapter-logic so i can't make a pull request.

amcdnl commented 7 years ago

Simply updating the depedencies made it work, PR here - https://github.com/lklepner/socket.io-adapter-mongo/pull/3

MickL commented 7 years ago

The Pull request is merged. So is this issue closed and fixed now?

Working for me. I used the project with npm like this within package.json: "socket.io-adapter-mongo": "git://github.com/lklepner/socket.io-adapter-mongo.git#v2.0.0"

lklepner commented 7 years ago

socket.io-adapter-mongo@2.0.0 has been published to NPM