diff options
author | Mario <mario@mariovavti.com> | 2024-01-25 10:13:10 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-01-25 10:13:10 +0000 |
commit | c0a7dfe2f6554fc66e753c456551dd580c479820 (patch) | |
tree | 2a5fe12284f8c2bfd44eb9e2af19fc9ef4e65cb4 /Zotlabs/Module/Share.php | |
parent | fe50d78a0f3d7655cd5eefb7cdae44779c52b2b1 (diff) | |
download | volse-hubzilla-c0a7dfe2f6554fc66e753c456551dd580c479820.tar.gz volse-hubzilla-c0a7dfe2f6554fc66e753c456551dd580c479820.tar.bz2 volse-hubzilla-c0a7dfe2f6554fc66e753c456551dd580c479820.zip |
refactor fetch_and_store_parents() and inroduce the fetchparents daemon
Diffstat (limited to 'Zotlabs/Module/Share.php')
-rw-r--r-- | Zotlabs/Module/Share.php | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Zotlabs/Module/Share.php b/Zotlabs/Module/Share.php index 342e8f6e5..ea9313fa8 100644 --- a/Zotlabs/Module/Share.php +++ b/Zotlabs/Module/Share.php @@ -65,8 +65,6 @@ class Share extends \Zotlabs\Web\Controller { $item = $r[0]; - $owner_uid = $r[0]['uid']; - $owner_aid = $r[0]['aid']; /* $can_comment = false; if((array_key_exists('owner',$item)) && intval($item['owner']['abook_self'])) @@ -96,21 +94,33 @@ class Share extends \Zotlabs\Web\Controller { else killme(); - - $arr['aid'] = $owner_aid; - $arr['uid'] = $owner_uid; + $arr['aid'] = $item['aid']; + $arr['uid'] = $item['uid']; $arr['item_origin'] = 1; $arr['item_wall'] = $item['item_wall']; + $arr['item_private'] = $item['item_private']; $arr['uuid'] = item_message_id(); $arr['mid'] = z_root() . '/activity/' . $arr['uuid']; - $arr['parent_mid'] = $item['mid']; + $arr['parent_mid'] = $item['parent_mid']; + $arr['thr_parent'] = $item['mid']; + + $created = datetime_convert(); + + $arr['created'] = $created; + $arr['edited'] = $created; + $arr['commented'] = $created; + $arr['received'] = $created; + $arr['changed'] = $created; + $arr['item_type'] = ITEM_TYPE_POST; $mention = '@[zrl=' . $item['author']['xchan_url'] . ']' . $item['author']['xchan_name'] . '[/zrl]'; $arr['body'] = sprintf( t('🔁 Repeated %1$s\'s %2$s'), $mention, Activity::activity_obj_mapper($item['obj_type'])); $arr['author_xchan'] = $channel['channel_hash']; $arr['owner_xchan'] = $item['author_xchan']; + $arr['source_xchan'] = ''; + $arr['obj'] = $item['obj']; $arr['obj_type'] = $item['obj_type']; $arr['verb'] = ACTIVITY_SHARE; |