aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-14 21:51:18 -0700
committerredmatrix <git@macgirvin.com>2016-04-14 21:53:39 -0700
commit521641f3a8e9d3b217e60baaf4fa3e5890108a4e (patch)
tree3de929e29513474ddae9de7b686ca4ae3ffefd3f /include/zot.php
parenta29c0371f1f3cceb9a9af3a62e5ed67886869c40 (diff)
downloadvolse-hubzilla-521641f3a8e9d3b217e60baaf4fa3e5890108a4e.tar.gz
volse-hubzilla-521641f3a8e9d3b217e60baaf4fa3e5890108a4e.tar.bz2
volse-hubzilla-521641f3a8e9d3b217e60baaf4fa3e5890108a4e.zip
filter out a bit more dreport noise - especially for private posts to multiple recipients.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 0cdf7fc87..9d9f9ab5f 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -4048,6 +4048,17 @@ function delivery_report_is_storable($dr) {
if(($dr['location'] !== z_root()) && ($dr['sender'] === $rxchan) && ($dr['status'] === 'recipient_not_found'))
return false;
+ // If you have a private post with a recipient list, every single site is going to report
+ // back a failed delivery for anybody on that list that isn't local to them. We're only
+ // concerned about this if we have a local hubloc record which says we expected them to
+ // have a channel on that site.
+
+ $r = q("select hubloc_id from hubloc where hubloc_hash = '%s' and hubloc_url = '%s'",
+ dbesc($rxchan),
+ dbesc($dr['location'])
+ );
+ if((! $r) && ($dr['status'] === 'recipient_not_found'))
+ return false;
$r = q("select abook_id from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
dbesc($rxchan),