From edd8b1204956e9e05b0bc29cfa60c2ec016637d6 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 29 Jan 2013 16:45:09 +0000 Subject: [PATCH 1/2] push authorID to author object and return via api... --- src/node/handler/PadMessageHandler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 24f72c796..ceef5de74 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -1536,6 +1536,7 @@ exports.padUsers = function (padID, callback) { } var aid = sessioninfos[ix].author; authorManager.getAuthor( aid, function ( err, author ) { + author.id = aid; authors.push( author ); if ( authors.length === pad2sessions[padID].length ) { callback(null, {padUsers: authors}); From a19ad983f1440fbac395793931046a857bbb2dfd Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 29 Jan 2013 16:48:56 +0000 Subject: [PATCH 2/2] docs for api change --- doc/api/http_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http_api.md b/doc/api/http_api.md index a7fc0bedd..0543ef71a 100644 --- a/doc/api/http_api.md +++ b/doc/api/http_api.md @@ -355,7 +355,7 @@ returns the number of user that are currently editing this pad returns the list of users that are currently editing this pad *Example returns:* - * `{code: 0, message:"ok", data: {padUsers: [{colorId:"#c1a9d9","name":"username1","timestamp":1345228793126},{"colorId":"#d9a9cd","name":"Hmmm","timestamp":1345228796042}]}}` + * `{code: 0, message:"ok", data: {padUsers: [{colorId:"#c1a9d9","name":"username1","timestamp":1345228793126,"id":"a.n4gEeMLsvg12452n"},{"colorId":"#d9a9cd","name":"Hmmm","timestamp":1345228796042,"id":"a.n4gEeMLsvg12452n"}]}}` * `{code: 0, message:"ok", data: {padUsers: []}}` #### deletePad(padID)