Fix user color is not following the author color
This commit is contained in:
parent
a14e7953b5
commit
d4804f7aa5
1 changed files with 4 additions and 0 deletions
|
@ -368,6 +368,10 @@ function finishConnection(socket, note, user) {
|
|||
return failConnection(403, 'connection forbidden', socket);
|
||||
}
|
||||
}
|
||||
// update user color to author color
|
||||
if (note.authors[user.userid]) {
|
||||
user.color = users[socket.id].color = note.authors[user.userid].color;
|
||||
}
|
||||
note.users[socket.id] = user;
|
||||
note.socks.push(socket);
|
||||
note.server.addClient(socket);
|
||||
|
|
Loading…
Reference in a new issue