summaryrefslogtreecommitdiff
path: root/lib/realtime.js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-06-17 23:33:57 +0200
committerGitHub2018-06-17 23:33:57 +0200
commit56d78a7d6c2b49bb194cba05d1a5ff5e4b54a983 (patch)
tree009a0c047d9b537548c0a4a741d60ade9b2ee6ea /lib/realtime.js
parentf36b10abb2368459e4ba546d826c16b3232f4ba0 (diff)
parentfce735e833f91a0f1d17c518b65c4c724d1a4b4d (diff)
Merge pull request #830 from SISheogorath/feature/GDPR
GDPR compliant part 1
Diffstat (limited to '')
-rw-r--r--lib/realtime.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index 070bde2d..f6c62d4e 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -486,11 +486,13 @@ function startConnection (socket) {
for (var i = 0; i < note.authors.length; i++) {
var author = note.authors[i]
var profile = models.User.getProfile(author.user)
- authors[author.userId] = {
- userid: author.userId,
- color: author.color,
- photo: profile.photo,
- name: profile.name
+ if (profile) {
+ authors[author.userId] = {
+ userid: author.userId,
+ color: author.color,
+ photo: profile.photo,
+ name: profile.name
+ }
}
}