aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-05-24 09:08:32 +0000
committerMario <mario@mariovavti.com>2023-05-24 09:08:32 +0000
commitaf0b4a0fca36cf8f52e1ef5f569dfb9268d92905 (patch)
treec0dd84dede1ca78e8e9efce32c54c825278ea08d /Zotlabs
parent404189f88c65d9287ca5b740af00e61b79cf685d (diff)
downloadvolse-hubzilla-af0b4a0fca36cf8f52e1ef5f569dfb9268d92905.tar.gz
volse-hubzilla-af0b4a0fca36cf8f52e1ef5f569dfb9268d92905.tar.bz2
volse-hubzilla-af0b4a0fca36cf8f52e1ef5f569dfb9268d92905.zip
return hubloc_hash instead of hubloc_id_url for AP and improved check for location
Diffstat (limited to 'Zotlabs')
-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'];
+ }
}
}
}