aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-22 02:32:04 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-22 02:32:04 -0700
commit0b1b11ea53ee3fd466eb338ac5ce67e62af87413 (patch)
tree7bdda0d64e1bf27f860af620dcab160c470664cc /include/notifier.php
parent146ff6f70308647b27374a1bba386c156498bd2e (diff)
downloadvolse-hubzilla-0b1b11ea53ee3fd466eb338ac5ce67e62af87413.tar.gz
volse-hubzilla-0b1b11ea53ee3fd466eb338ac5ce67e62af87413.tar.bz2
volse-hubzilla-0b1b11ea53ee3fd466eb338ac5ce67e62af87413.zip
heavy lifting for delivery reports
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/notifier.php b/include/notifier.php
index e16f80ecf..fd95d53e2 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -662,6 +662,18 @@ function notifier_run($argv, $argc){
dbesc($n),
dbesc(json_encode($encoded_item))
);
+ // only create delivery reports for normal undeleted items
+ if(array_key_exists('postopts',$target_item) && (! $target_item['item_deleted'])) {
+ q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan, dreport_queue ) values ( '%s','%s','%s','%s','%s','%s','%s' ) ",
+ dbesc($target_item['mid']),
+ dbesc($hub['hubloc_host']),
+ dbesc($hub['hubloc_host']),
+ dbesc('queued'),
+ dbesc(datetime_convert()),
+ dbesc($channel['channel_hash']),
+ dbesc($hash)
+ );
+ }
}
$deliver[] = $hash;