From 562a160a527cc2a43413816d18ecfe078ae01095 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 29 Jul 2021 12:29:39 +0000 Subject: remove another possible source for hubloc confusion --- Zotlabs/Lib/Libzot.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index ae8c725d7..e0e13eb60 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1910,16 +1910,18 @@ class Libzot { // logger($AS->debug()); - $r = q("select hubloc_hash from hubloc where hubloc_id_url = '%s' limit 1", + $r = q("select hubloc_hash, hubloc_network from hubloc where hubloc_id_url = '%s'", dbesc($AS->actor['id']) ); + $r = self::zot_record_preferred($r); if (!$r) { $y = import_author_xchan(['url' => $AS->actor['id']]); if ($y) { - $r = q("select hubloc_hash from hubloc where hubloc_id_url = '%s' limit 1", + $r = q("select hubloc_hash, hubloc_network from hubloc where hubloc_id_url = '%s'", dbesc($AS->actor['id']) ); + $r = self::zot_record_preferred($r); } if (!$r) { logger('FOF Activity: no actor'); @@ -1935,9 +1937,8 @@ class Libzot { } } - if ($r) { - $arr['author_xchan'] = $r[0]['hubloc_hash']; + $arr['author_xchan'] = $r['hubloc_hash']; } if ($signer) { -- cgit v1.2.3