aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-10-11 07:41:12 +0000
committerMario <mario@mariovavti.com>2021-10-11 07:41:12 +0000
commitaa41b1675745b7f95f0cb190b75654ede4b340df (patch)
tree26a1c73b182abc13f678145dca356c5ff6c11379 /Zotlabs
parentf4d59abe411438937889f3423c9c91403c3fcc2e (diff)
downloadvolse-hubzilla-aa41b1675745b7f95f0cb190b75654ede4b340df.tar.gz
volse-hubzilla-aa41b1675745b7f95f0cb190b75654ede4b340df.tar.bz2
volse-hubzilla-aa41b1675745b7f95f0cb190b75654ede4b340df.zip
look for hubloc_id_url or hubloc_hash, otherwise we will always fetch the key from the net on platforms where those are different (e.g. mastodon).
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Web/HTTPSig.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php
index 6905e7326..5aa1e1913 100644
--- a/Zotlabs/Web/HTTPSig.php
+++ b/Zotlabs/Web/HTTPSig.php
@@ -281,8 +281,9 @@ 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 left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s' and hubloc_network in ('zot6', 'activitypub') order by hubloc_id desc",
+ $x = q("select * from xchan left 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)
);