mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-03 12:31:43 +00:00
Add comment explaining why not sending anon data up
This commit is contained in:
parent
bb06f82e04
commit
26acdfd072
1 changed files with 4 additions and 3 deletions
|
@ -137,7 +137,7 @@ module.exports = WebsocketController =
|
|||
], (error, {project_id, first_name, last_name, email, user_id}) ->
|
||||
return callback(error) if error?
|
||||
logger.log {user_id, project_id, client_id: client.id, cursorData: cursorData}, "updating client position"
|
||||
|
||||
|
||||
AuthorizationManager.assertClientCanViewProjectAndDoc client, cursorData.doc_id, (error) ->
|
||||
if error?
|
||||
logger.warn {err: error, client_id: client.id, project_id, user_id}, "silently ignoring unauthorized updateClientPosition. Client likely hasn't called joinProject yet."
|
||||
|
@ -145,10 +145,11 @@ module.exports = WebsocketController =
|
|||
cursorData.id = client.id
|
||||
cursorData.user_id = user_id if user_id?
|
||||
cursorData.email = email if email?
|
||||
# Don't store anonymous users in redis to avoid influx
|
||||
if !user_id or user_id == 'anonymous-user'
|
||||
cursorData.name = ""
|
||||
callback()
|
||||
else
|
||||
else
|
||||
cursorData.name = if first_name && last_name
|
||||
"#{first_name} #{last_name}"
|
||||
else if first_name
|
||||
|
@ -166,7 +167,7 @@ module.exports = WebsocketController =
|
|||
row: cursorData.row,
|
||||
column: cursorData.column,
|
||||
doc_id: cursorData.doc_id
|
||||
}, callback)
|
||||
}, callback)
|
||||
WebsocketLoadBalancer.emitToRoom(project_id, "clientTracking.clientUpdated", cursorData)
|
||||
|
||||
getConnectedUsers: (client, callback = (error, users) ->) ->
|
||||
|
|
Loading…
Reference in a new issue