This commit is contained in:
Sacha Greif 2015-02-01 20:44:13 +09:00
parent f5c8489acb
commit b992538c7e

View file

@ -49,10 +49,10 @@ commentAfterSubmitMethodCallbacks.push(function (comment) {
if (!!comment.parentCommentId) {
var parentComment = Comments.findOne(comment.parentCommentId);
// do not notify author of parent comment if they're also post author or comment author
// (someone could be replying to their own comment)
if (parentComment.userId !== post.userId || parentComment.userId !== comment.userId) {
if (parentComment.userId !== post.userId && parentComment.userId !== comment.userId) {
// add parent comment to notification data
notificationData.parentComment = _.pick(parentComment, '_id', 'userId', 'author');
@ -79,9 +79,6 @@ commentAfterSubmitMethodCallbacks.push(function (comment) {
}
console.log(userIdsNotified)
console.log(comment.body)
return comment;
});