-
Notifications
You must be signed in to change notification settings - Fork 43
Keep client event handlers stored in an array #522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay! 👏
Just a syntax nitpick for now (which your text editor should actually warn about, if it's linting the source code live). Have yet to test it with running code.
I've done some manual testing, but not extensively. I don't have any unit tests set up for this JS file, but plan to add integration tests which would register multiple handlers, etc. (Once that branch work is complete). Created issue: #525 |
Just one question, as I was looking at it: did you consider |
@raucao that's not implemented, I'm thinking maybe this would be better to include an actual event emitter which proxies for the socket even emitter, rather than a makeshift one. It would need to basically be re-written though. Maybe this could be a temporary fix for the specific issue with a new task to re-write the whole thing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's do it as you propose. I was able to test this one with Hyperchannel successfully (albeit the channel join failures directly after the connect still persist, so that's a different issue in the XMPP platform itself).
Created #526 |
Allows for multiple handlers to be registered for the special
on
events thatsockethub-client
needs to intercept. Resolves #495