diff options
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 15 |
1 files changed, 15 insertions, 0 deletions
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; |