diff options
author | Mario <mario@mariovavti.com> | 2024-03-04 21:24:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-04 21:24:21 +0000 |
commit | d7ceb977daec6aa07ba3a8e4bbc1d493d59509d1 (patch) | |
tree | 8095858670f3158e48412e7f04a028d5056bc305 /Zotlabs/Lib/Activity.php | |
parent | 3f32a5239d7d95410de9b53396a8751556a41ec5 (diff) | |
download | volse-hubzilla-d7ceb977daec6aa07ba3a8e4bbc1d493d59509d1.tar.gz volse-hubzilla-d7ceb977daec6aa07ba3a8e4bbc1d493d59509d1.tar.bz2 volse-hubzilla-d7ceb977daec6aa07ba3a8e4bbc1d493d59509d1.zip |
basic AS2 support for things
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 1e0ce6ae2..fb92e6398 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -205,14 +205,27 @@ class Activity { if (!$r) return []; + $channel = channelx_by_n($r[0]['obj_channel']); + + $content = '[zrl=' . $channel['xchan_url'] . ']' . $channel['channel_name'] . '[/zrl] '; + $content .= $r[0]['obj_verb'] . ' '; + $content .= '[zrl=' . $r[0]['obj_url'] . ']' . $r[0]['obj_term'] . '[/zrl]'; + $x = [ - 'type' => 'Object', + 'type' => 'Page', 'id' => z_root() . '/thing/' . $r[0]['obj_obj'], - 'name' => $r[0]['obj_term'] + 'name' => $r[0]['obj_term'], + 'content' => bbcode($content), + 'url' => $r[0]['obj_url'] ]; - if ($r[0]['obj_image']) - $x['image'] = $r[0]['obj_image']; + if ($r[0]['obj_image']) { + $x['icon'] = [ + 'type' => 'Image', + 'url' => $r[0]['obj_image'] + + ]; + } return $x; |