Fixes some problems with the new API

This commit is contained in:
Peter 'Pita' Martischka 2011-07-05 17:07:09 +02:00 committed by Pita Poison
parent 7a10e1783a
commit 58c50302f1

View file

@ -193,7 +193,7 @@ function handleSuggestUserName(client, message)
throw "suggestUserName Message has no unnamedId!"; throw "suggestUserName Message has no unnamedId!";
} }
var padId = session2pad[client.sessionId]; var padId = session2pad[client.id];
//search the author and send him this message //search the author and send him this message
for(var i in pad2sessions[padId]) for(var i in pad2sessions[padId])
@ -704,7 +704,7 @@ function handleClientReady(client, message)
if(sessionID != client.id) if(sessionID != client.id)
{ {
//Send this Session the Notification about the new user //Send this Session the Notification about the new user
socketio.clients[sessionID].json.send(messageToTheOtherUsers); socketio.sockets.sockets[sessionID].json.send(messageToTheOtherUsers);
//Send the new User a Notification about this other user //Send the new User a Notification about this other user
var messageToNotifyTheClientAboutTheOthers = { var messageToNotifyTheClientAboutTheOthers = {