aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-05 18:08:06 -0800
committerfriendica <info@friendica.com>2013-01-05 18:08:06 -0800
commit529451a4e535abb015589149c01b1e9f6d5a0ce2 (patch)
tree183c58e3df61c36c2111ccda7747cad8bc13ab2c /include/items.php
parent22ceb7c048c94cd11ad68652e44234e601df3ee9 (diff)
downloadvolse-hubzilla-529451a4e535abb015589149c01b1e9f6d5a0ce2.tar.gz
volse-hubzilla-529451a4e535abb015589149c01b1e9f6d5a0ce2.tar.bz2
volse-hubzilla-529451a4e535abb015589149c01b1e9f6d5a0ce2.zip
start rewrite of notification system delivery backend
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php15
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;