aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2015-09-22 13:11:54 +0200
committermrjive <mrjive@mrjive.it>2015-09-22 13:11:54 +0200
commit5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d (patch)
treeece0274497ae0f3bc427cfa6e8f10752dd9934dc /include/zot.php
parent49d11ed9f88531bcd03f2f129230b0352014c22c (diff)
parent4b13f0e025b08263d7231845bc76034d9adc7847 (diff)
downloadvolse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.tar.gz
volse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.tar.bz2
volse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.zip
Merge pull request #3 from redmatrix/master
updating from original codebase
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 767abae38..fb55da0fa 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -957,6 +957,25 @@ 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'])
+ );
+ }
+ }
+ }
+
+ q("delete from dreport where dreport_queue = '%s' limit 1",
+ dbesc($outq['outq_hash'])
+ );
+
// update the timestamp for this site
q("update site set site_dead = 0, site_update = '%s' where site_url = '%s'",
@@ -1564,6 +1583,13 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
+ if($d['hash'] === $sender['hash']) {
+ $DR->update('self delivery ignored');
+ $result[] = $DR->get();
+ continue;
+ }
+
+
// allow public postings to the sys channel regardless of permissions, but not
// for comments travelling upstream. Wait and catch them on the way down.
// They may have been blocked by the owner.