aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
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 /Zotlabs/Module
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 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Ping.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php
index 96ade22c0..eab49d69e 100644
--- a/Zotlabs/Module/Ping.php
+++ b/Zotlabs/Module/Ping.php
@@ -268,7 +268,18 @@ class Ping extends \Zotlabs\Web\Controller {
$mid = basename($tt['link']);
- $b64mid = ((strpos($mid, 'b64.' === 0)) ? $mid : 'b64.' . base64url_encode($mid));
+ if(in_array($tt['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
+ // we need the thread parent
+ $r = q("select thr_parent from item where mid = '%s' and uid = %d limit 1",
+ dbesc($mid),
+ intval(local_channel())
+ );
+
+ $b64mid = ((strpos($r[0]['thr_parent'], 'b64.' === 0)) ? $r[0]['thr_parent'] : 'b64.' . base64url_encode($r[0]['thr_parent']));
+ }
+ else {
+ $b64mid = ((strpos($mid, 'b64.' === 0)) ? $mid : 'b64.' . base64url_encode($mid));
+ }
$notifs[] = array(
'notify_link' => z_root() . '/notify/view/' . $tt['id'],