-
Notifications
You must be signed in to change notification settings - Fork 80
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
review on_message jn MessageHandler #153
Comments
The line you're pointing to is Line num 2, which is a comment line. However, if yo meant line 29, it is using |
I see and yes talking about that line. So basically msginfo['msg'] has |
From what Josh told me yesterday, i think there is only one value in there,
|
The issue actually references line 34 now. This is used as a handshake between the user and the server, so on a websocket connection opening the user sends back the string "user:[USERNAME]" to open the connection. From there, only the server sends information back to the user as JSON. That's why this is set up in this manner. |
Why did you close this? Not sure the explanation actually solves the |
It's not really parsing anything as it's a handshake string. I closed it because it's a handshake that works effectively, unless someone can think of a better way to do it. |
The better way to do it is not to pass "user:" in the message. |
I added that as a safety check, in case somehow a different message is passed back from the client. |
Well, if the client can send messages back it can add the 'user:', so not |
It's in case other information needs to be sent back from the user, not just the handshake. This makes it so that specifically when the username is sent back it starts the process of registering the redis listener and other things required for the actual messaging to happen. Currently this doesn't send anything else back to the server, but in the future it may. |
or it may not, right? Again, this implementations is currently ugly so |
I don't understand what you mean. |
You are adding some extra text to a message as perhaps in the future it |
Agree with @antgonza here. The field is misleading at best as the field being check is "user:" but the interpretation is "here is the channel I'm listening on" or "acknowledged". If the intent is to structure this for future undefined messages, then that is fine, but it would be good to decompose it appropriately. |
It's a bit muddled since the channel name is the user name (in this case email) but it's broken down in the pull request. |
This line is currently parsing text vs json, need to review it this is OK
The text was updated successfully, but these errors were encountered: