aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-14 15:37:35 -0800
committerzotlabs <mike@macgirvin.com>2018-02-14 15:37:35 -0800
commitc11ebd12d5baa6aa8f7ea51b7e753ed2d3a0d1d8 (patch)
treeb052b2d5e52b751aa7242e7938fca56879d2da7e /include
parent465d89129caaaa0240229f8d6f81d68f26eb60b0 (diff)
parent033608292007a726b6fdffe839f6e481939f7a1d (diff)
downloadvolse-hubzilla-c11ebd12d5baa6aa8f7ea51b7e753ed2d3a0d1d8.tar.gz
volse-hubzilla-c11ebd12d5baa6aa8f7ea51b7e753ed2d3a0d1d8.tar.bz2
volse-hubzilla-c11ebd12d5baa6aa8f7ea51b7e753ed2d3a0d1d8.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index 6a6308da1..04962ec76 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2327,6 +2327,16 @@ function send_status_notifications($post_id,$item) {
$parent = 0;
+ if(array_key_exists('verb',$item) && (activity_match($item['verb'], ACTIVITY_LIKE) || activity_match($item['verb'], ACTIVITY_DISLIKE))) {
+
+ $r = q("select id from item where mid = '%s' and uid = %d limit 1",
+ dbesc($item['thr_parent']),
+ intval($item['uid'])
+ );
+
+ $thr_parent_id = $r[0]['id'];
+ }
+
$r = q("select channel_hash from channel where channel_id = %d limit 1",
intval($item['uid'])
);
@@ -2392,10 +2402,10 @@ function send_status_notifications($post_id,$item) {
'to_xchan' => $r[0]['channel_hash'],
'item' => $item,
'link' => $link,
- 'verb' => ACTIVITY_POST,
+ 'verb' => $item['verb'],
'otype' => 'item',
- 'parent' => $parent,
- 'parent_mid' => $item['parent_mid']
+ 'parent' => $thr_parent_id ? $thr_parent_id : $parent,
+ 'parent_mid' => $thr_parent_id ? $item['thr_parent'] : $item['parent_mid']
));
}