]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Merge https://github.com/friendica/friendica into pull
[friendica.git] / mod / item.php
index d82d54cfff08fa77d63e296e9db138c4815d5ada..6c1c06f99a901ea505dba9368252285ad821936e 100644 (file)
@@ -545,6 +545,10 @@ function item_post(&$a) {
 
        $uri = item_new_uri($a->get_hostname(),$profile_uid);
 
+       // Fallback so that we alway have a thr-parent
+       if(!$thr_parent)
+               $thr_parent = $uri;
+
        $datarray = array();
        $datarray['uid']           = $profile_uid;
        $datarray['type']          = $post_type;
@@ -604,7 +608,7 @@ function item_post(&$a) {
 
        if($preview) {
                require_once('include/conversation.php');
-               $o = conversation($a,array(array_merge($contact_record,$datarray)),'search');
+               $o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false);
                logger('preview: ' . $o);
                echo json_encode(array('preview' => $o));
                killme();
@@ -744,6 +748,7 @@ function item_post(&$a) {
                                        'verb'         => ACTIVITY_POST,
                                        'otype'        => 'item',
                                        'parent'       => $parent,
+                                       'parent_uri'   => $parent_item['uri']
                                ));
                        
                        }