mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
20 lines
No EOL
629 B
JavaScript
20 lines
No EOL
629 B
JavaScript
Posts.getNotificationProperties = function (data) {
|
|
const post = data.post;
|
|
const postAuthor = Meteor.users.findOne(post.userId);
|
|
const properties = {
|
|
postAuthorName : Posts.getAuthorName(post),
|
|
postTitle : Telescope.utils.cleanUp(post.title),
|
|
profileUrl: Users.getProfileUrl(postAuthor, true),
|
|
postUrl: Posts.getPageUrl(post, true),
|
|
thumbnailUrl: post.thumbnailUrl,
|
|
linkUrl: !!post.url ? Telescope.utils.getOutgoingUrl(post.url) : Posts.getPageUrl(post, true)
|
|
};
|
|
|
|
if(post.url)
|
|
properties.url = post.url;
|
|
|
|
if(post.htmlBody)
|
|
properties.htmlBody = post.htmlBody;
|
|
|
|
return properties;
|
|
}; |