File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -508,12 +508,18 @@ var paduserlist = (function()
508508 } ) ;
509509 //
510510 } ,
511- users : function ( ) {
512- // Returns an object of users who have been on this pad
513- // Firstly we have to get live data..
514- var userList = otherUsersInfo ;
511+ usersOnline : function ( )
512+ {
513+ // Returns an object of users who are currently online on this pad
514+ var userList = [ ] . concat ( otherUsersInfo ) ; // Make a copy of the otherUsersInfo, otherwise every call to users modifies the referenced array
515515 // Now we need to add ourselves..
516516 userList . push ( myUserInfo ) ;
517+ return userList ;
518+ } ,
519+ users : function ( ) {
520+ // Returns an object of users who have been on this pad
521+ var userList = self . usersOnline ( ) ;
522+
517523 // Now we add historical authors
518524 var historical = clientVars . collab_client_vars . historicalAuthorData ;
519525 for ( var key in historical ) {
@@ -528,7 +534,6 @@ var paduserlist = (function()
528534 if ( exists === false ) {
529535 userList . push ( historical [ key ] ) ;
530536 }
531-
532537 }
533538 return userList ;
534539 } ,
You can’t perform that action at this time.
0 commit comments