From 46f67eaa1e40954267088ba67726adc0d389628c Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 29 Feb 2024 17:05:48 +0000 Subject: AS2 Update and implement a first draft of AS2 Profile activities --- include/activities.php | 122 +++++++++++++++++++++---------------------------- 1 file changed, 51 insertions(+), 71 deletions(-) (limited to 'include/activities.php') diff --git a/include/activities.php b/include/activities.php index f5f0e55da..bb80e7906 100644 --- a/include/activities.php +++ b/include/activities.php @@ -1,100 +1,80 @@ 'alternate', 'type' => 'text/html', - 'href' => z_root() . '/profile/' . $self['channel_address']); - $links[] = array('rel' => 'photo', 'type' => $self['xchan_photo_mimetype'], - 'href' => $self['xchan_photo_l']); - - $arr['object'] = json_encode(array( - 'type' => 'Profile', - 'title' => $self['channel_name'], - 'id' => $self['xchan_url'] . '/' . $self['xchan_hash'], - 'link' => $links - )); - - - $arr['allow_cid'] = $self['channel_allow_cid']; - $arr['allow_gid'] = $self['channel_allow_gid']; - $arr['deny_cid'] = $self['channel_deny_cid']; - $arr['deny_gid'] = $self['channel_deny_gid']; - - $res = item_store($arr); - $i = $res['item_id']; - - if($i) { - // FIXME - limit delivery in notifier.php to those specificed in the perms argument - Zotlabs\Daemon\Master::Summon(array('Notifier','activity', $i, 'PERMS_R_PROFILE')); - } + $arr['obj'] = [ + 'type' => 'Profile', + 'summary' => bbcode($message), + 'source' => [ + 'summary' => $message, + 'mediaType' => 'text/bbcode' + ], + 'describes' => Activity::encode_person($channel), + 'url' => z_root() . '/profile/' . $channel['channel_address'] + ]; + + post_activity_item($arr); } -- cgit v1.2.3