diff options
Diffstat (limited to 'Zotlabs/Web/HTTPSig.php')
-rw-r--r-- | Zotlabs/Web/HTTPSig.php | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index e5d73293a..ef191b171 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -230,25 +230,25 @@ class HTTPSig { return ['public_key' => $key]; } - $deleted = false; - if ($keytype === 'deleted') { - $deleted = true; - } - if ($keytype === 'zot6') { - $key = self::get_zotfinger_key($id, $force, $deleted); + $key = self::get_zotfinger_key($id, $force); if ($key) { return $key; } } if (strpos($id, '#') === false) { - $key = self::get_webfinger_key($id, $force, $deleted); + $key = self::get_webfinger_key($id, $force); if ($key) { return $key; } } + $deleted = false; + if ($keytype === 'deleted') { + $deleted = true; + } + $key = self::get_activitystreams_key($id, $force, $deleted); return $key; @@ -331,7 +331,7 @@ class HTTPSig { * false if no pub key found, otherwise return an array with the pub key */ - static function get_webfinger_key($id, $force = false, $deleted = false) { + static function get_webfinger_key($id, $force = false) { if (!$force) { $x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' and hubloc_network in ('zot6', 'activitypub') order by hubloc_id desc", @@ -347,12 +347,6 @@ class HTTPSig { } } - if ($deleted) { - // If we received a delete and we do not have the record cached, - // we probably never saw this actor. Do not try to fetch it now. - return false; - } - $wf = Webfinger::exec($id); $key = ['portable_id' => '', 'public_key' => '', 'hubloc' => []]; @@ -384,7 +378,7 @@ class HTTPSig { * false if no pub key found, otherwise return an array with the public key */ - static function get_zotfinger_key($id, $force = false, $deleted = false) { + static function get_zotfinger_key($id, $force = false) { if (!$force) { $x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' and hubloc_network = 'zot6' order by hubloc_id desc", dbesc($id) @@ -399,12 +393,6 @@ class HTTPSig { } } - if ($deleted) { - // If we received a delete and we do not have the record cached, - // we probably never saw this actor. Do not try to fetch it now. - return false; - } - $wf = Webfinger::exec($id); $key = ['portable_id' => '', 'public_key' => '', 'hubloc' => []]; |