-
Notifications
You must be signed in to change notification settings - Fork 27
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
fixed subscriber bug in main library #10
Conversation
Hello! Can you re-submit your PR against the newest version? There are a few changes to the script to work better with node. I actually think we can omit the line you've changed; it does look like we're checking in the block above if it's an admin or not. @julioterra and @quinkennedy can you confirm? |
The following line of code actually checks if the message was an admin if (!data.message["clientName"]) Standard non-admin messages should not include the attribute "clientName". Brett and Quin, have either of you updated the server recently in a way Julio On Thu, Mar 20, 2014 at 11:11 PM, Brett Renfer notifications@github.comwrote:
|
@julioterra It's either the sb-1.3.1.js that's outdated or the server libraries. they just don't match, perhaps the fix should be on the server side, but changing that line fixed the problem for me. When I removed the route via admin, this is what came through: @robotconscience , that's the latest version forked last night and pushed back with few minutes. Is there a newer somewhere? |
@julioterra isn't the line before also checking for admin? @quinkennedy can you confirm? @lokers hm, looking at your changes it still says upgrade from 1.2. Don't worry about it at the moment, I think we may be able to remove that line completely.
|
@julioterra @quinkennedy just a random thought, any chance it's just a bad bool comparison that chrome can understand but some node implementations don't?
|
yes, all messages coming from the Server now include "clientName". This is a good example (for myself to learn from) of why you should not use implicit features to infer information. I'll review now. |
Perhaps checking route vs message vs admin object will solve this... just a thought. |
OK i'm going to knock out that line! Closing this PR, thanks again for figuring this out! |
more info about the bug here:
http://stackoverflow.com/questions/22442890/spacebrew-locally-arduino-yun-web-page-subscriber-not-working
and here:
https://groups.google.com/forum/#!topic/spacebrew-cc/uxzPQFqFN-4
I've tested on my machine and it seems like it's solving the problem, please review as authors if this is a good solution.
cheers