$item['mid'] ]); if (!$object) { killme(); } $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['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'] = $object; $arr['obj_type'] = $item['obj_type']; $arr['verb'] = ACTIVITY_SHARE; call_hooks('post_local', $arr); $post = item_store($arr); $post_id = $post['item_id']; $approval_id = $post['approval_id'] ?? 0; $arr['id'] = $post_id; call_hooks('post_local_end', $arr); // info( t('Post repeated') . EOL); /* $r = q("select * from item where id = %d", intval($post_id) ); if($r) { xchan_query($r); $sync_item = fetch_post_tags($r); Libsync::build_sync_packet($channel['channel_id'], [ 'item' => [ encode_item($sync_item[0],true) ] ]); } */ Master::Summon([ 'Notifier', 'like', $post_id ]); if ($approval_id) { Master::Summon(['Notifier', 'like', $approval_id]); } killme(); } }