Permalink
Browse files

fixes

  • Loading branch information...
1 parent f387fb5 commit 4b3e6769507e66fe5161307b6f7161e7726cc370 @impronunciable impronunciable committed Sep 22, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 chat.js
View
@@ -56,6 +56,10 @@ app.get('/room/:id',function(req,res,next){
client.lindex(['rooms',req.params.id],function(err,room_name){
client.smembers('users'+req.params.id,function(error,user_list){
client.lrange(['rooms',0,-1],function(err,rooms){
+ user_list.forEach(function(user){
+ if(user == req.getAuthDetails().user.username)
+ user_list.splice(user_list.indexOf(user),1);
+ });
res.locals({'rooms':rooms,'room_name':room_name,'room_id':req.params.id,'username': req.getAuthDetails().user.username,'user_list':user_list});
res.render('room');
});

0 comments on commit 4b3e676

Please sign in to comment.