diff options
author | Mario <mario@mariovavti.com> | 2020-10-14 07:33:30 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-10-14 07:33:30 +0000 |
commit | e2e160b8e8d01eb0d2c537318f1d738aef9df9c8 (patch) | |
tree | 4d7453ed5327227dbe5492d98eec7f6e29cf9030 /Zotlabs/Lib/Activity.php | |
parent | 45a5a0418983127edd5e726adf8b10cb45950cbd (diff) | |
download | volse-hubzilla-e2e160b8e8d01eb0d2c537318f1d738aef9df9c8.tar.gz volse-hubzilla-e2e160b8e8d01eb0d2c537318f1d738aef9df9c8.tar.bz2 volse-hubzilla-e2e160b8e8d01eb0d2c537318f1d738aef9df9c8.zip |
In find_best_identity() only look for zot and zot6 network types. Otherwise we could end up rewriting activitypub contacts to their diaspora equivalent which would be counterproductive here. Dismiss deleted hublocs. Same applies for find_best_zot_identity(). Also add logging.
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 6d12f7ea1..08e5ffaca 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -3194,11 +3194,12 @@ class Activity { static function find_best_identity($xchan) { if(filter_var($xchan, FILTER_VALIDATE_URL)) { - $r = q("select hubloc_hash, hubloc_network from hubloc where hubloc_id_url = '%s'", + $r = q("select hubloc_hash, hubloc_network from hubloc where hubloc_id_url = '%s' and hubloc_network in ('zot6', 'zot') and hubloc_deleted = 0", dbesc($xchan) ); if ($r) { $r = Libzot::zot_record_preferred($r); + logger('find_best_identity: ' . $xchan . ' > ' . $r['hubloc_hash']); return $r['hubloc_hash']; } } |