aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index ced361fe5..c2acff83f 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -841,7 +841,7 @@ class Activity {
if (isset($i['app']) && $i['app']) {
$ret['generator'] = ['type' => 'Application', 'name' => $i['app']];
}
- if (isset($i['location']) || isset($i['coord'])) {
+ if (!empty($i['location']) || !empty($i['coord'])) {
$ret['location'] = ['type' => 'Place'];
if ($i['location']) {
$ret['location']['name'] = $i['location'];
@@ -929,7 +929,6 @@ class Activity {
];
call_hooks('encode_activity', $hookinfo);
-
return $hookinfo['encoded'];
}
@@ -974,10 +973,14 @@ class Activity {
$tmp = expand_acl($i['allow_cid']);
$list = stringify_array($tmp, true);
if ($list) {
- $details = q("select hubloc_id_url from hubloc where hubloc_hash in (" . $list . ") and hubloc_id_url != '' and hubloc_deleted = 0");
+ $details = q("select hubloc_id_url, hubloc_hash, hubloc_network from hubloc where hubloc_hash in (" . $list . ") and hubloc_id_url != '' and hubloc_deleted = 0");
if ($details) {
foreach ($details as $d) {
- $ret[] = $d['hubloc_id_url'];
+ if ($d['hubloc_network'] === 'activitypub') {
+ $ret[] = $d['hubloc_hash'];
+ } else {
+ $ret[] = $d['hubloc_id_url'];
+ }
}
}
}