mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
Merge pull request #1428 from ether/padUsers-authorID
Include author ID in padUsers response
This commit is contained in:
commit
e7cb7c46c1
2 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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});
|
||||
|
|
Loading…
Reference in a new issue