diff --git a/server/notifications/outgoing.js b/server/notifications/outgoing.js index 6fe90d93a..1dc3d8053 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, + }); + } } } },