mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
17 lines
No EOL
579 B
JavaScript
17 lines
No EOL
579 B
JavaScript
notify= function(event, properties, userToNotify, userDoingAction){
|
|
// console.log('adding new notification for:'+getDisplayName(userToNotify)+', for event:'+event);
|
|
// console.log(userToNotify);
|
|
// console.log(userDoingAction);
|
|
// console.log(properties);
|
|
if(userToNotify._id!=userDoingAction._id){
|
|
// make sure we don't notify people of their own actions
|
|
var notification= {
|
|
timestamp: new Date().getTime(),
|
|
userId: userToNotify._id,
|
|
event: event,
|
|
properties: properties,
|
|
read: false
|
|
}
|
|
var newNotificationId=Notifications.insert(notification);
|
|
}
|
|
}; |