diff options
author | zotlabs <mike@macgirvin.com> | 2018-02-07 21:53:47 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-02-07 21:53:47 -0800 |
commit | 6cf2e9945a08451e3d53b6e79002843e9cdb8dc6 (patch) | |
tree | 5a26980d9fb6337857c091d0b428ec8ffc95216a /include/queue_fn.php | |
parent | b21a5c3ce902c4c88b2bb3dcae5d63a93e25479c (diff) | |
download | volse-hubzilla-6cf2e9945a08451e3d53b6e79002843e9cdb8dc6.tar.gz volse-hubzilla-6cf2e9945a08451e3d53b6e79002843e9cdb8dc6.tar.bz2 volse-hubzilla-6cf2e9945a08451e3d53b6e79002843e9cdb8dc6.zip |
encrypt the httpsig for zot6 transport
Diffstat (limited to 'include/queue_fn.php')
-rw-r--r-- | include/queue_fn.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/queue_fn.php b/include/queue_fn.php index d31e41b61..e50d58dd7 100644 --- a/include/queue_fn.php +++ b/include/queue_fn.php @@ -121,7 +121,7 @@ function queue_deliver($outq, $immediate = false) { $base = null; $h = parse_url($outq['outq_posturl']); - if($h) + if($h !== false) $base = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : ''); if(($base) && ($base !== z_root()) && ($immediate)) { @@ -160,6 +160,9 @@ function queue_deliver($outq, $immediate = false) { + + + $arr = array('outq' => $outq, 'base' => $base, 'handled' => false, 'immediate' => $immediate); call_hooks('queue_deliver',$arr); if($arr['handled']) @@ -223,9 +226,24 @@ function queue_deliver($outq, $immediate = false) { $channel = channelx_by_n($outq['outq_channel']); } + $host_crypto = null; + + if($channel && $base) { + $h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1", + dbesc($base) + ); + if($h) { + $host_crypto = $h[0]; + } + } + + + + + $msg = $outq['outq_notify']; - $result = zot_zot($outq['outq_posturl'],$msg,$channel); + $result = zot_zot($outq['outq_posturl'],$msg,$channel,$host_crypto); if($result['success']) { |