aboutsummaryrefslogtreecommitdiffstats
path: root/include/deliver.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-17 13:26:55 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-17 13:26:55 -0700
commit4b984f98193d8f9fad4c89aade378e7df238a708 (patch)
tree97e70d998bfdc4b05f4ee2c86c15fafb8a80ae86 /include/deliver.php
parente8882a516722b60e647af479b52f6593426bcfdd (diff)
downloadvolse-hubzilla-4b984f98193d8f9fad4c89aade378e7df238a708.tar.gz
volse-hubzilla-4b984f98193d8f9fad4c89aade378e7df238a708.tar.bz2
volse-hubzilla-4b984f98193d8f9fad4c89aade378e7df238a708.zip
filter delivery reports
Diffstat (limited to 'include/deliver.php')
-rw-r--r--include/deliver.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/deliver.php b/include/deliver.php
index a338d1a89..11c1b249e 100644
--- a/include/deliver.php
+++ b/include/deliver.php
@@ -138,14 +138,16 @@ function deliver_run($argv, $argc) {
if($dresult && is_array($dresult)) {
foreach($dresult 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'])
- );
+ if(delivery_report_is_storable($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'])
+ );
+ }
}
}
}