summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormluto <m@luto.at>2013-01-06 14:55:33 +0100
committermluto <m@luto.at>2013-01-06 14:55:33 +0100
commit9484b92ae236888fc72a181adf3248816b52b7f0 (patch)
treeab1da941e153126ed48e0c62dbe05b13566d8be3
parent6e7b6942430c7974fb66817de6452343b62a75fc (diff)
downloadetherpad-lite-9484b92ae236888fc72a181adf3248816b52b7f0.zip
fixed and unified indenting, added comments in handleClientReady
-rw-r--r--src/node/handler/PadMessageHandler.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js
index a0bccfc5..ef70d604 100644
--- a/src/node/handler/PadMessageHandler.js
+++ b/src/node/handler/PadMessageHandler.js
@@ -782,15 +782,15 @@ function handleClientReady(client, message)
var padIds;
async.series([
- // Get ro/rw id:s
- function (callback) {
+ //Get ro/rw id:s
+ function (callback)
+ {
readOnlyManager.getIds(message.padId, function(err, value) {
if(ERR(err, callback)) return;
padIds = value;
callback();
});
},
-
//check permissions
function(callback)
{
@@ -816,7 +816,7 @@ function handleClientReady(client, message)
}
});
},
- //get all authordata of this new user
+ //get all authordata of this new user, and load the pad-object from the database
function(callback)
{
async.parallel([
@@ -840,6 +840,7 @@ function handleClientReady(client, message)
callback();
});
},
+ //get pad
function(callback)
{
padManager.getPad(padIds.padId, function(err, value)
@@ -851,7 +852,7 @@ function handleClientReady(client, message)
}
], callback);
},
- //these db requests all need the pad object
+ //these db requests all need the pad object (timestamp of latest revission, author data, chat messages)
function(callback)
{
var authors = pad.getAllAuthors();
@@ -894,6 +895,7 @@ function handleClientReady(client, message)
], callback);
},
+ //glue the clientVars together, send them and tell the other clients that a new one is there
function(callback)
{
//Check that the client is still here. It might have disconnected between callbacks.
@@ -980,11 +982,10 @@ function handleClientReady(client, message)
},
"abiwordAvailable": settings.abiwordAvailable(),
"plugins": {
- "plugins": plugins.plugins,
- "parts": plugins.parts,
- },
- "initialChangesets": [] // FIXME: REMOVE THIS SHIT
-
+ "plugins": plugins.plugins,
+ "parts": plugins.parts,
+ },
+ "initialChangesets": [] // FIXME: REMOVE THIS SHIT
}
//Add a username to the clientVars if one avaiable