start rewrite of notification system delivery backend

This commit is contained in:
friendica
2013-01-05 18:08:06 -08:00
parent 22ceb7c048
commit 529451a4e5
3 changed files with 82 additions and 46 deletions

View File

@@ -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;