From 529451a4e535abb015589149c01b1e9f6d5a0ce2 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 5 Jan 2013 18:08:06 -0800 Subject: start rewrite of notification system delivery backend --- include/items.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 8e4e2dd8d..de441c6b7 100755 --- a/include/items.php +++ b/include/items.php @@ -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; -- cgit v1.2.3