Vulcan/packages/nova-comments/lib/notifications.js

13 lines
482 B
JavaScript
Raw Normal View History

2016-04-13 12:34:41 +09:00
Comments.getNotificationProperties = function (comment) {
2016-04-05 16:27:32 +09:00
var commentAuthor = Meteor.users.findOne(comment.userId);
2016-04-13 12:34:41 +09:00
var post = Posts.findOne(comment.postId);
2016-04-05 16:27:32 +09:00
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;
};