Skip to content

Commit 5d59d73

Browse files
author
Joshua Hamilton
committed
user rooms individual name
1 parent 43f0ddc commit 5d59d73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ io.on('connection', function(socket){
1919

2020
//iterate over allClients to check userName for duplicates
2121
allClients.forEach(function(client){
22-
if(client.userName == user || user == 'undefined'){
22+
if(client.userName == user && client.room == room || user == 'undefined'){
2323
userExists = true;
2424
}
2525
})

0 commit comments

Comments
 (0)