aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/item.php b/mod/item.php
index 87f7f75d9..757506bc4 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -92,6 +92,7 @@ function item_post(&$a) {
// if this isn't the real parent of the conversation, find it
if($r !== false && count($r)) {
$parid = $r[0]['parent'];
+ $parent_uri = $r[0]['uri'];
if($r[0]['id'] != $r[0]['parent']) {
$r = q("SELECT * FROM `item` WHERE `id` = `parent` AND `parent` = %d LIMIT 1",
intval($parid)
@@ -109,7 +110,7 @@ function item_post(&$a) {
$parent = $r[0]['id'];
// multi-level threading - preserve the info but re-parent to our single level threading
- if(($parid) && ($parid != $parent))
+ //if(($parid) && ($parid != $parent))
$thr_parent = $parent_uri;
if($parent_item['contact-id'] && $uid) {
@@ -549,6 +550,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;