summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/realtime.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index 7e93f20a..1c99f02e 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -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);