2016-05-17 12:18:05 +09:00
|
|
|
Comments.getNotificationProperties = function (data) {
|
|
|
|
const comment = data.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;
|
2016-04-13 12:55:21 +09:00
|
|
|
};
|