aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Gprobe.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-09-23 14:28:04 +0000
committerMario <mario@mariovavti.com>2020-09-23 14:28:04 +0000
commitd23e8309555640ddbb909d2ef32baa0936d0c34b (patch)
treea1708a95475055285dc96ecba35653057ea4d2d3 /Zotlabs/Daemon/Gprobe.php
parent5edec37d571b79dc4fcc30aac1c48b2fc1ae66c9 (diff)
downloadvolse-hubzilla-d23e8309555640ddbb909d2ef32baa0936d0c34b.tar.gz
volse-hubzilla-d23e8309555640ddbb909d2ef32baa0936d0c34b.tar.bz2
volse-hubzilla-d23e8309555640ddbb909d2ef32baa0936d0c34b.zip
port mod gprobe
Diffstat (limited to 'Zotlabs/Daemon/Gprobe.php')
-rw-r--r--Zotlabs/Daemon/Gprobe.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Daemon/Gprobe.php b/Zotlabs/Daemon/Gprobe.php
index f1ffb2d81..da92fbec7 100644
--- a/Zotlabs/Daemon/Gprobe.php
+++ b/Zotlabs/Daemon/Gprobe.php
@@ -2,7 +2,9 @@
namespace Zotlabs\Daemon;
-require_once('include/zot.php');
+use Zotlabs\Lib\Libzot;
+use Zotlabs\Lib\Webfinger;
+use Zotlabs\Lib\Zotfinger;
// performs zot_finger on $argv[1], which is a hex_encoded webbie/reddress
@@ -22,12 +24,16 @@ class Gprobe {
);
if(! $r) {
- $j = \Zotlabs\Zot\Finger::run($url,null);
- if($j['success']) {
- $y = import_xchan($j);
+ $href = Webfinger::zot_url(punify($url));
+ if($href) {
+ $zf = Zotfinger::exec($href,$channel);
+ }
+ if(is_array($zf) && array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $href && intval($zf['signature']['header_valid'])) {
+ $xc = Libzot::import_xchan($zf['data']);
}
}
return;
+
}
}