Merge remote branch 'upstream/master'

This commit is contained in:
Wikinaut 2011-11-14 08:32:46 +01:00
commit 916e900cf3

View file

@ -136,7 +136,7 @@ exports.handleDisconnect = function(client)
{ {
if(pad2sessions[sessionPad][i] == client.id) if(pad2sessions[sessionPad][i] == client.id)
{ {
delete pad2sessions[sessionPad][i]; pad2sessions[sessionPad].splice(i, 1);
break; break;
} }
} }
@ -809,14 +809,9 @@ function handleClientReady(client, message)
//Send the clientVars to the Client //Send the clientVars to the Client
client.json.send(clientVars); client.json.send(clientVars);
//sometimes the client disconnects very early and the session of it is already removed //Save the revision and the author id in sessioninfos
//thats why we have to check that case sessioninfos[client.id].rev = pad.getHeadRevisionNumber();
if(sessioninfos[client.id] !== undefined) sessioninfos[client.id].author = author;
{
//Save the revision and the author id in sessioninfos
sessioninfos[client.id].rev = pad.getHeadRevisionNumber();
sessioninfos[client.id].author = author;
}
//prepare the notification for the other users on the pad, that this user joined //prepare the notification for the other users on the pad, that this user joined
var messageToTheOtherUsers = { var messageToTheOtherUsers = {