heavy lifting for delivery reports

This commit is contained in:
redmatrix
2015-09-22 02:32:04 -07:00
parent 146ff6f703
commit 0b1b11ea53
9 changed files with 105 additions and 4 deletions

View File

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