strip author name from notify messages in notifications - fix issue #911
This commit is contained in:
parent
becd5f1446
commit
601ebee969
@ -262,6 +262,13 @@ class Ping extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
if($t) {
|
if($t) {
|
||||||
foreach($t as $tt) {
|
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(
|
$notifs[] = array(
|
||||||
'notify_link' => z_root() . '/notify/view/' . $tt['id'],
|
'notify_link' => z_root() . '/notify/view/' . $tt['id'],
|
||||||
'name' => $tt['xname'],
|
'name' => $tt['xname'],
|
||||||
@ -269,7 +276,7 @@ class Ping extends \Zotlabs\Web\Controller {
|
|||||||
'photo' => $tt['photo'],
|
'photo' => $tt['photo'],
|
||||||
'when' => relative_date($tt['created']),
|
'when' => relative_date($tt['created']),
|
||||||
'hclass' => (($tt['seen']) ? 'notify-seen' : 'notify-unseen'),
|
'hclass' => (($tt['seen']) ? 'notify-seen' : 'notify-unseen'),
|
||||||
'message' => strip_tags(bbcode($tt['msg']))
|
'message' => $message
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user