aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Enotify.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-17 07:33:45 +0000
committerMario <mario@mariovavti.com>2021-06-17 07:33:45 +0000
commitb55676d08914d58927b5503a1bfa283397cd6d44 (patch)
tree34827895f126f9afe0c1db284e089632e19984c6 /Zotlabs/Lib/Enotify.php
parentb5a8ca6ef72366d355c99702f0a775ccc36734d5 (diff)
downloadvolse-hubzilla-b55676d08914d58927b5503a1bfa283397cd6d44.tar.gz
volse-hubzilla-b55676d08914d58927b5503a1bfa283397cd6d44.tar.bz2
volse-hubzilla-b55676d08914d58927b5503a1bfa283397cd6d44.zip
New landing page HQ with separate views for direct messages, public/limited messages and starred messages if the feature is enabled
Diffstat (limited to 'Zotlabs/Lib/Enotify.php')
-rw-r--r--Zotlabs/Lib/Enotify.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index 7e33f09b8..50b564bde 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -124,14 +124,14 @@ class Enotify {
if ($params['type'] == NOTIFY_MAIL) {
logger('notification: mail');
- $subject = sprintf( t('[$Projectname:Notify] New mail received at %s'),$sitename);
-
- $preamble = sprintf( t('%1$s sent you a new private message at %2$s.'), $sender['xchan_name'],$sitename);
- $epreamble = sprintf( t('%1$s sent you %2$s.'),'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]', '[zrl=$itemlink]' . t('a private message') . '[/zrl]');
- $sitelink = t('Please visit %s to view and/or reply to your private messages.');
- $tsitelink = sprintf( $sitelink, $siteurl . '/mail/' . $params['item']['id'] );
- $hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '/mail/' . $params['item']['id'] . '">' . $sitename . '</a>');
- $itemlink = $siteurl . '/mail/' . $params['item']['id'];
+ $subject = sprintf( t('[$Projectname:Notify] New direct message received at %s'),$sitename);
+
+ $preamble = sprintf( t('%1$s sent you a new direct message at %2$s.'), $sender['xchan_name'],$sitename);
+ $epreamble = sprintf( t('%1$s sent you %2$s.'),'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]', '[zrl=$itemlink]' . t('a direct message') . '[/zrl]');
+ $sitelink = t('Please visit %s to view and/or reply to your direct messages.');
+ $tsitelink = sprintf( $sitelink, $siteurl . '/hq/' . gen_link_id($params['item']['mid']));
+ $hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '/hq/' . gen_link_id($params['item']['mid']) . '">' . $sitename . '</a>');
+ $itemlink = $siteurl . '/hq/' . gen_link_id($params['item']['mid']);
}
if ($params['type'] == NOTIFY_COMMENT) {
@@ -886,7 +886,7 @@ class Enotify {
$b64mid = ((strpos($mid, 'b64.') === 0) ? $mid : 'b64.' . base64url_encode($mid));
$x = [
- 'notify_link' => z_root() . '/notify/view/' . $tt['id'],
+ 'notify_link' => (($tt['ntype'] === NOTIFY_MAIL) ? $tt['link'] : z_root() . '/notify/view/' . $tt['id']),
'name' => $tt['xname'],
'url' => $tt['url'],
'photo' => $tt['photo'],
@@ -945,7 +945,7 @@ class Enotify {
'photo' => $rr['xchan_photo_s'],
'when' => datetime_convert('UTC', date_default_timezone_get(), $rr['created']),
'hclass' => (intval($rr['mail_seen']) ? 'notify-seen' : 'notify-unseen'),
- 'message' => t('sent you a private message'),
+ 'message' => t('sent you a direct message'),
];
return $x;