aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-11-17 10:40:34 +0100
committerMario Vavti <mario@mariovavti.com>2017-11-17 10:40:34 +0100
commit601ebee9692c3bb552100f08f789824c68bdd5e0 (patch)
tree1192eb15173d6c47ee1a0984c4eba1ac6539b1ba /Zotlabs
parentbecd5f1446dd837e006f31d3befb611c20445d8d (diff)
downloadvolse-hubzilla-601ebee9692c3bb552100f08f789824c68bdd5e0.tar.gz
volse-hubzilla-601ebee9692c3bb552100f08f789824c68bdd5e0.tar.bz2
volse-hubzilla-601ebee9692c3bb552100f08f789824c68bdd5e0.zip
strip author name from notify messages in notifications - fix issue #911
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Ping.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php
index 3c6dda1e9..b18ff84b8 100644
--- a/Zotlabs/Module/Ping.php
+++ b/Zotlabs/Module/Ping.php
@@ -262,6 +262,13 @@ class Ping extends \Zotlabs\Web\Controller {
if($t) {
foreach($t as $tt) {
+
+ $message = trim(strip_tags(bbcode($tt['msg'])));
+ $count = 1;
+
+ if(strpos($message, $tt['xname']) === 0)
+ $message = str_replace($tt['xname'], '', $message, $count);
+
$notifs[] = array(
'notify_link' => z_root() . '/notify/view/' . $tt['id'],
'name' => $tt['xname'],
@@ -269,7 +276,7 @@ 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']))
+ 'message' => $message
);
}
}