aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-11-19 20:37:58 +0100
committerMario Vavti <mario@mariovavti.com>2017-11-19 20:37:58 +0100
commit727b49c8aba0997212b0c4adeb064bd5706a0b2c (patch)
treec8629bd0f305a70e78a48f902e5995fc9833c852
parent0aa01740d16a148e7b92734b0f15881781367625 (diff)
downloadvolse-hubzilla-727b49c8aba0997212b0c4adeb064bd5706a0b2c.tar.gz
volse-hubzilla-727b49c8aba0997212b0c4adeb064bd5706a0b2c.tar.bz2
volse-hubzilla-727b49c8aba0997212b0c4adeb064bd5706a0b2c.zip
do not double encode already encoded mid
-rw-r--r--Zotlabs/Module/Ping.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php
index a6df1d3a6..f98626ffb 100644
--- a/Zotlabs/Module/Ping.php
+++ b/Zotlabs/Module/Ping.php
@@ -267,6 +267,11 @@ class Ping extends \Zotlabs\Web\Controller {
if(strpos($message, $tt['xname']) === 0)
$message = substr($message, strlen($tt['xname']) + 1);
+
+ $mid = basename($tt['link']);
+
+ $b64mid = ((strpos($mid, 'b64.' === 0)) ? $mid : 'b64.' . base64url_encode($mid));
+
$notifs[] = array(
'notify_link' => z_root() . '/notify/view/' . $tt['id'],
'name' => $tt['xname'],
@@ -274,7 +279,7 @@ class Ping extends \Zotlabs\Web\Controller {
'photo' => $tt['photo'],
'when' => relative_date($tt['created']),
'hclass' => (($tt['seen']) ? 'notify-seen' : 'notify-unseen'),
- 'b64mid' => 'b64.' . base64url_encode(basename($tt['link'])),
+ 'b64mid' => $b64mid,
'notify_id' => $tt['id'],
'message' => $message
);