}
$post['edit'] = $post;
- $post['file'] = Post\Category::getTextByURIId($post['uri-id'], $post['uid']);
+ $post['file'] = Post\Category::getTextByURIId($post['uri-id'], $post['uid']);
Post\Media::deleteByURIId($post['uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO, Post\Media::IMAGE, Post\Media::HTML]);
$post = item_process($post, $request, $preview, $return_path);
DI::contentItem()->postProcessPost($post, $recipients);
+ if (($post['private'] == Item::PRIVATE) && ($post['thr-parent-id'] != $post['uri-id'])) {
+ DI::contentItem()->copyPermissions($post['thr-parent-id'], $post['uri-id']);
+ }
+
Logger::debug('post_complete');
item_post_return(DI::baseUrl(), $return_path);
$post['uri-id'] = -1;
$post['author-network'] = Protocol::DFRN;
$post['author-updated'] = '';
+ $post['author-alias'] = '';
$post['author-gsid'] = 0;
$post['author-uri-id'] = ItemURI::getIdByURI($post['author-link']);
$post['owner-updated'] = '';
$post['body'] = BBCode::removeSharedData(Item::setHashtags($post['body']));
$post['writable'] = true;
- $o = DI::conversation()->create([$post], Conversation::MODE_SEARCH, false, true);
+ $o = DI::conversation()->render([$post], Conversation::MODE_SEARCH, false, true);
System::jsonExit(['preview' => $o]);
}
$args = DI::args();
- if (!$args->has(3)) {
+ if (!$args->has(2)) {
throw new HTTPException\BadRequestException();
}