mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
if a user does not have a first or last name use their email for their name in connected user data
This commit is contained in:
parent
97641ed205
commit
478910a3aa
1 changed files with 6 additions and 1 deletions
|
@ -21,11 +21,16 @@ define [
|
|||
# Don't store myself
|
||||
continue
|
||||
# Store data in the same format returned by clientTracking.clientUpdated
|
||||
if user.first_name?.length == 0 and user.last_name.length == 0
|
||||
name = user.email
|
||||
else
|
||||
name = "#{user.first_name} #{user.last_name}"
|
||||
|
||||
@$scope.onlineUsers[user.client_id] = {
|
||||
id: user.client_id
|
||||
user_id: user.user_id
|
||||
email: user.email
|
||||
name: "#{user.first_name} #{user.last_name}"
|
||||
name: name
|
||||
doc_id: user.cursorData?.doc_id
|
||||
row: user.cursorData?.row
|
||||
column: user.cursorData?.column
|
||||
|
|
Loading…
Reference in a new issue