]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Merge https://github.com/friendica/friendica into pull
[friendica.git] / mod / item.php
index d5c36ef76c5ab934daa4aed6f47a9bc8af6bb4f4..6c1c06f99a901ea505dba9368252285ad821936e 100644 (file)
@@ -439,6 +439,7 @@ function item_post(&$a) {
 
        $body = bb_translate_video($body);
 
+
        /**
         * Fold multi-line [code] sequences
         */
@@ -447,6 +448,8 @@ function item_post(&$a) {
 
        $body = scale_external_images($body,false);
 
+
+
        /**
         * Look for any tags and linkify them
         */
@@ -542,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;
@@ -601,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();
@@ -741,6 +748,7 @@ function item_post(&$a) {
                                        'verb'         => ACTIVITY_POST,
                                        'otype'        => 'item',
                                        'parent'       => $parent,
+                                       'parent_uri'   => $parent_item['uri']
                                ));
                        
                        }