Skip to content

Commit

Permalink
fix status dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiandouce committed Aug 1, 2012
1 parent 1d4d116 commit 0d84047
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ app.get('/:id', utils.restrict, function(req, res) {
utils.getRoomInfo(req, res, client, function(room) {
utils.getUsersInRoom(req, res, client, room, function(users) {
utils.getPublicRoomsInfo(client, function(rooms) {
utils.getUserStatus(req.user.username, client, function(status) {
utils.getUserStatus(req.user, client, function(status) {
utils.enterRoom(req, res, room, users, rooms, status);
});
});
Expand Down
4 changes: 2 additions & 2 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ exports.getPublicRooms = function(client, fn){
* Get User status
*/

exports.getUserStatus = function(userKey, client, fn){
client.get('users:' + userKey + ':status', function(err, status) {
exports.getUserStatus = function(user, client, fn){
client.get('users:' + user.provider + ":" + user.username + ':status', function(err, status) {
if (!err && status) fn(status);
else fn('available');
});
Expand Down

0 comments on commit 0d84047

Please sign in to comment.