Vulcan/packages/nova-comments/lib/notifications.js
2016-05-17 12:18:05 +09:00

14 lines
No EOL
511 B
JavaScript

Comments.getNotificationProperties = function (data) {
const comment = data.comment;
var commentAuthor = Meteor.users.findOne(comment.userId);
var post = Posts.findOne(comment.postId);
var properties = {
profileUrl: commentAuthor && commentAuthor.getProfileUrl(true),
postUrl: Posts.getPageUrl(post, true),
authorName : Comments.getAuthorName(comment),
postTitle: post.title,
htmlBody: comment.htmlBody,
commentUrl: Comments.getPageUrl(comment, true)
};
return properties;
};