From af5ae163f39c5cbb1f2cc07b62d654c1e0b71753 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 May 2023 08:18:16 +0000 Subject: more fixes for where keyId = acct:xxx@yyy.zz --- Zotlabs/Web/HTTPSig.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Web/HTTPSig.php') diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index 0ab315eee..2f04003ab 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -303,7 +303,8 @@ class HTTPSig { // $force is used to ignore the local cache and only use the remote data; for instance the cached key might be stale if (!$force) { - $x = q("select * from xchan join hubloc on xchan_hash = hubloc_hash where (hubloc_id_url = '%s' or hubloc_hash = '%s') and hubloc_network in ('zot6', 'activitypub') order by hubloc_id desc", + $x = q("select * from xchan join hubloc on xchan_hash = hubloc_hash where (hubloc_addr = '%s' or hubloc_id_url = '%s' or hubloc_hash = '%s') and hubloc_network in ('zot6', 'activitypub') order by hubloc_id desc", + dbesc(str_replace('acct:', '', $url)), dbesc($url), dbesc($url) ); @@ -378,7 +379,9 @@ class HTTPSig { $best = []; if (!$force) { - $x = q("select * from xchan join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' and hubloc_network in ('zot6', 'activitypub') order by hubloc_id desc", + $x = q("select * from xchan join hubloc on xchan_hash = hubloc_hash where (hubloc_addr = '%s' or hubloc_id_url = '%s' or hubloc_hash = '%s') and hubloc_network in ('zot6', 'activitypub') order by hubloc_id desc", + dbesc(str_replace('acct:', '', $id)), + dbesc($id), dbesc($id) ); -- cgit v1.2.3 From 18b7b3f125b88143d4edefec22a0df67869788d9 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 16 Jun 2023 12:16:22 +0000 Subject: deprecate ActivityStreams::fetch() and provide the possibility to fetch local items directly --- Zotlabs/Web/HTTPSig.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Web/HTTPSig.php') diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index 2f04003ab..531b18649 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -4,7 +4,7 @@ namespace Zotlabs\Web; use DateTime; use DateTimeZone; -use Zotlabs\Lib\ActivityStreams; +use Zotlabs\Lib\Activity; use Zotlabs\Lib\Crypto; use Zotlabs\Lib\Keyutils; use Zotlabs\Lib\Webfinger; @@ -324,7 +324,7 @@ class HTTPSig { } // The record wasn't in cache. Fetch it now. - $r = ActivityStreams::fetch($id); + $r = Activity::fetch($id); $signatureAlgorithm = EMPTY_STR; if ($r) { -- cgit v1.2.3