mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 18:11:40 -05:00
Merge branch 'master' of github.com:TelescopeJS/Telescope
This commit is contained in:
commit
c4983fb790
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue