summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/notifications/outgoing.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/server/notifications/outgoing.js b/server/notifications/outgoing.js
index 6fe90d93..1dc3d805 100644
--- a/server/notifications/outgoing.js
+++ b/server/notifications/outgoing.js
@@ -55,11 +55,15 @@ Meteor.methods({
},
});
} else {
- CardComments.insert({
- text: newComment,
- cardId,
- boardId,
- });
+ const userId = data.userId;
+ if (userId) {
+ CardComments.insert({
+ text: newComment,
+ userId,
+ cardId,
+ boardId,
+ });
+ }
}
}
},