aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 767abae38..f728d8fb9 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -957,6 +957,21 @@ function zot_process_response($hub, $arr, $outq) {
logger('zot_process_response: headers: ' . print_r($arr['header'],true), LOGGER_DATA);
}
+ if(array_key_exists('delivery_report',$x)) {
+ foreach($x['delivery_report'] as $xx) {
+ if(is_array($xx) && array_key_exists('message_id',$xx)) {
+ q("insert into dreport ( dreport_mid, dreport_site, dreport_recip, dreport_result, dreport_time, dreport_xchan ) values ( '%s', '%s','%s','%s','%s','%s' ) ",
+ dbesc($xx['message_id']),
+ dbesc($xx['location']),
+ dbesc($xx['recipient']),
+ dbesc($xx['status']),
+ dbesc(datetime_convert($xx['date'])),
+ dbesc($xx['sender'])
+ );
+ }
+ }
+ }
+
// update the timestamp for this site
q("update site set site_dead = 0, site_update = '%s' where site_url = '%s'",