diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-02-13 11:01:58 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-02-13 11:01:58 +0100 |
commit | d826515ba8d2d1d78abed6701df3c2c3550e87df (patch) | |
tree | 249ceef23c1967e598485665723503b987296526 /Zotlabs/Module/Ping.php | |
parent | b221c68e4b4da59ec9405a1c1bac87ceba7eb2ca (diff) | |
download | volse-hubzilla-d826515ba8d2d1d78abed6701df3c2c3550e87df.tar.gz volse-hubzilla-d826515ba8d2d1d78abed6701df3c2c3550e87df.tar.bz2 volse-hubzilla-d826515ba8d2d1d78abed6701df3c2c3550e87df.zip |
since we only save the parent mid in notify we must look for thr_parent when dealing with likes
Diffstat (limited to 'Zotlabs/Module/Ping.php')
-rw-r--r-- | Zotlabs/Module/Ping.php | 13 |
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'], |