aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-09-05 11:11:51 +0000
committerMario <mario@mariovavti.com>2021-09-05 11:11:51 +0000
commit18cd3926d7a0875e5dcc1f2a1bc49db9eefbeed3 (patch)
tree9d73273cadd311104c12da9af5efa414208df306 /Zotlabs/Lib/Activity.php
parent0e1e1cda7ab78baff4f960580c2a0fa92f97c0eb (diff)
downloadvolse-hubzilla-18cd3926d7a0875e5dcc1f2a1bc49db9eefbeed3.tar.gz
volse-hubzilla-18cd3926d7a0875e5dcc1f2a1bc49db9eefbeed3.tar.bz2
volse-hubzilla-18cd3926d7a0875e5dcc1f2a1bc49db9eefbeed3.zip
omit deleted hublocs in get_actor_hublocs() and use Activity::get_actor_collections() to get collections. Fallback to xconfig->collections if Activity::get_actor_collections() does not return anything yet.
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 583141c60..a4cd28bd5 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1111,6 +1111,7 @@ class Activity {
call_hooks('encode_person', $arr);
$ret = $arr['encoded'];
+
return $ret;
}
@@ -1552,6 +1553,7 @@ class Activity {
$ap_hubloc = null;
$hublocs = self::get_actor_hublocs($url);
+
if ($hublocs) {
foreach ($hublocs as $hub) {
if ($hub['hubloc_network'] === 'activitypub') {
@@ -3555,25 +3557,24 @@ class Activity {
return (XConfig::Get($id,'system','actor_record'));
}
-
static function get_actor_hublocs($url, $options = 'all') {
$hublocs = false;
switch ($options) {
case 'activitypub':
- $hublocs = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where hubloc_hash = '%s' ",
+ $hublocs = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where hubloc_hash = '%s' and hubloc_deleted = 0 ",
dbesc($url)
);
break;
case 'zot6':
- $hublocs = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where hubloc_id_url = '%s' ",
+ $hublocs = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where hubloc_id_url = '%s' and hubloc_deleted = 0 ",
dbesc($url)
);
break;
case 'all':
default:
- $hublocs = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where ( hubloc_id_url = '%s' OR hubloc_hash = '%s' ) ",
+ $hublocs = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash where ( hubloc_id_url = '%s' OR hubloc_hash = '%s' ) and hubloc_deleted = 0 ",
dbesc($url),
dbesc($url)
);