mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
Get anonToken from joinProject payload
This commit is contained in:
@@ -67,9 +67,8 @@ module.exports = Router =
|
||||
user = {_id: "anonymous-user"}
|
||||
|
||||
client.on "joinProject", (data = {}, callback) ->
|
||||
anonToken = session?.anonReadOnlyTokenAccess?[data.project_id]
|
||||
if anonToken
|
||||
user.anonToken = anonToken
|
||||
if data.anonToken
|
||||
user.anonToken = data.anonToken
|
||||
WebsocketController.joinProject client, user, data.project_id, (err, args...) ->
|
||||
if err?
|
||||
Router._handleError callback, err, client, "joinProject", {project_id: data.project_id, user_id: user?.id}
|
||||
|
||||
Reference in New Issue
Block a user