getNotification = function(event, properties){ var notification = {}; var p = properties; switch(event){ case 'newReply': notification.subject = 'Someone replied to your comment on "'+p.postHeadline+'"'; notification.text = p.commentAuthorName+' has replied to your comment on "'+p.postHeadline+'": '+Meteor.absoluteUrl()+'/posts/'+p.postId+'/comment/'+p.commentId; notification.html = ''+p.commentAuthorName+' has replied to your comment on "'+p.postHeadline+'".'; break; case 'newComment': notification.subject = 'A new comment on your post "'+p.postHeadline+'"'; notification.text = 'You have a new comment by '+p.commentAuthorName+' on your post "'+p.postHeadline+'": '+Meteor.absoluteUrl()+'/posts/'+p.postId+'/comment/'+p.commentId; notification.html = ''+p.commentAuthorName+' left a new comment on your post "'+p.postHeadline+'".'; break; case 'newPost': notification.subject = p.postAuthorName+' has created a new post: "'+p.postHeadline+'"'; notification.text = p.postAuthorName+' has created a new post: "'+p.postHeadline+'" '+Meteor.absoluteUrl()+'/posts/'+p.postId; notification.html = ''+p.postAuthorName+' has created a new post: "'+p.postHeadline+'".'; break; default: break; } return notification; }