mozilla/talkilla — pull request #38 by tOkeshu (2013-04-12 10:19:08+00:00)
Title: Attach the websocket to the signed in users

This PR is quite big. Here are the things to keep in mind when you review it:

- The `users` app state is now a hash and not a list anymore. The idea here is to attach different values to a user (the key is the nickname).
- It adds a `usersToArray` function to keep the same interface for the frontend. This could change in the future.
- The biggest change is without a doubt the fact that the websocket opening drives the presence as we now attach the websocket to the nick. This changes the way we use the API: first you signin, then you open a websocket giving your nick. This is for now insecure. But in the future I expect the signin API to returns a token that will be provided to confirm the nick given to the websocket is legit.