start rewrite of notification system delivery backend
This commit is contained in:
@@ -1727,6 +1727,7 @@ function mail_store($arr) {
|
||||
if($r) {
|
||||
$current_post = $r[0]['id'];
|
||||
logger('mail_store: created item ' . $current_post, LOGGER_DEBUG);
|
||||
$arr['id'] = $current_post; // for notification
|
||||
}
|
||||
else {
|
||||
logger('mail_store: could not locate created item');
|
||||
@@ -1740,6 +1741,20 @@ function mail_store($arr) {
|
||||
intval($current_post)
|
||||
);
|
||||
}
|
||||
else {
|
||||
require_once('include/enotify.php');
|
||||
|
||||
$notif_params = array(
|
||||
'from_xchan' => $arr['from_xchan'],
|
||||
'to_xchan' => $arr['to_xchan'],
|
||||
'type' => NOTIFY_MAIL,
|
||||
'item' => $arr,
|
||||
'verb' => ACTIVITY_POST,
|
||||
'otype' => 'mail'
|
||||
);
|
||||
|
||||
notification($notif_params);
|
||||
}
|
||||
|
||||
call_hooks('post_mail_end',$arr);
|
||||
return $current_post;
|
||||
|
||||
Reference in New Issue
Block a user