aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-09-23 14:28:04 +0000
committerMario <mario@mariovavti.com>2020-09-23 16:35:03 +0200
commit5d6a7922c11c8951f4f0c8288065474bd189fb3d (patch)
tree8c28b29925a94232f6b494929971c1a21eea6812
parent762de94900aff2bbf3714a150edd611b24a1c354 (diff)
downloadvolse-hubzilla-5d6a7922c11c8951f4f0c8288065474bd189fb3d.tar.gz
volse-hubzilla-5d6a7922c11c8951f4f0c8288065474bd189fb3d.tar.bz2
volse-hubzilla-5d6a7922c11c8951f4f0c8288065474bd189fb3d.zip
port mod gprobe
(cherry picked from commit d23e8309555640ddbb909d2ef32baa0936d0c34b)
-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;
+
}
}