Merge branch 'master' of github.com:TelescopeJS/Telescope

This commit is contained in:
Sacha Greif 2014-07-22 11:44:18 +09:00
commit c4983fb790

View file

@ -53,7 +53,7 @@ Meteor.methods({
var currentUser = Meteor.users.findOne(this.userId);
console.log('newPostNotify');
// send a notification to every user according to their notifications settings
Meteor.users.find().forEach(function(user) {
Meteor.users.find({'profile.notifications.posts': 1}).forEach(function(user) {
// don't send users notifications for their own posts
if(user._id !== currentUser._id && getUserSetting('notifications.posts', false, user)){
properties.userId = user._id;
@ -68,4 +68,4 @@ sendNotification = function (notification) {
// console.log('send notification:')
// console.log(notification)
sendEmail(notification.to, notification.subject, notification.text, notification.html);
};
};