aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-05 17:35:56 -0700
committerzotlabs <mike@macgirvin.com>2017-09-05 17:35:56 -0700
commit80400d719145c843a1bb80a34d5815d15ffc5893 (patch)
tree0756e2359311fce23c959b2afd2dd89c8aeddb8c /Zotlabs
parent6147f819ce908d7a52f905658e827c48aad92074 (diff)
parent68a91ec3ea7eaf56689545535a7481a838eff4da (diff)
downloadvolse-hubzilla-80400d719145c843a1bb80a34d5815d15ffc5893.tar.gz
volse-hubzilla-80400d719145c843a1bb80a34d5815d15ffc5893.tar.bz2
volse-hubzilla-80400d719145c843a1bb80a34d5815d15ffc5893.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/ThreadItem.php2
-rw-r--r--Zotlabs/Module/Display.php5
2 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index f9565d339..d33f3c183 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -413,7 +413,7 @@ class ThreadItem {
'previewing' => ($conv->is_preview() ? true : false ),
'preview_lbl' => t('This is an unsaved preview'),
'wait' => t('Please wait'),
- 'submid' => str_replace(['+','='], ['',''], base64_encode(substr($item['mid'],0,32))),
+ 'submid' => str_replace(['+','='], ['',''], base64_encode($item['mid'])),
'thread_level' => $thread_level
);
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 68da3e247..11c75219d 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -89,7 +89,7 @@ class Display extends \Zotlabs\Web\Controller {
if($decoded)
$item_hash = $decoded;
- $r = q("select id, uid, mid, parent_mid, item_type, item_deleted from item where mid like '%s' limit 1",
+ $r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted from item where mid like '%s' limit 1",
dbesc($item_hash . '%')
);
@@ -165,7 +165,8 @@ class Display extends \Zotlabs\Web\Controller {
'$dend' => '',
'$dbegin' => '',
'$verb' => '',
- '$mid' => $item_hash
+ //if the target item is not a post (eg a like) want to address its thread parent
+ '$mid' => (($target_item['verb'] == ACTIVITY_POST) ? $item_hash : $target_item['thr_parent'])
));
head_add_link([