aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Ping.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-19 17:39:42 -0800
committerzotlabs <mike@macgirvin.com>2017-11-19 17:39:42 -0800
commit6a49e3124e193edf57005873e825bf8328649183 (patch)
tree138c2387b7d107575f89a3de9ad3c35ae2ce60c6 /Zotlabs/Module/Ping.php
parent16f584608f8147a58bfe295ff3295aae0f85b38a (diff)
parent88d0bf94d89ac739469528bdab7905d0c00cf8a9 (diff)
downloadvolse-hubzilla-6a49e3124e193edf57005873e825bf8328649183.tar.gz
volse-hubzilla-6a49e3124e193edf57005873e825bf8328649183.tar.bz2
volse-hubzilla-6a49e3124e193edf57005873e825bf8328649183.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'Zotlabs/Module/Ping.php')
-rw-r--r--Zotlabs/Module/Ping.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php
index 3c6dda1e9..8644b8326 100644
--- a/Zotlabs/Module/Ping.php
+++ b/Zotlabs/Module/Ping.php
@@ -262,6 +262,16 @@ class Ping extends \Zotlabs\Web\Controller {
if($t) {
foreach($t as $tt) {
+ $message = trim(strip_tags(bbcode($tt['msg'])));
+
+ 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'],
@@ -269,7 +279,9 @@ class Ping extends \Zotlabs\Web\Controller {
'photo' => $tt['photo'],
'when' => relative_date($tt['created']),
'hclass' => (($tt['seen']) ? 'notify-seen' : 'notify-unseen'),
- 'message' => strip_tags(bbcode($tt['msg']))
+ 'b64mid' => $b64mid,
+ 'notify_id' => (($tt['otype'] == 'item') ? $tt['id'] : ''),
+ 'message' => $message
);
}
}