diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/enotify.php | 6 | ||||
-rw-r--r-- | include/zot.php | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/include/enotify.php b/include/enotify.php index 5a55aee09..96a152d31 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -253,14 +253,14 @@ function notification($params) { if($params['type'] == NOTIFY_INTRO) { $subject = sprintf( t('[Red:Notify] Introduction received')); - $preamble = sprintf( t('%1$s, you\'ve received an introduction from \'%2$s\' at %3$s'), $recip['channel_name'], $sender['xchan_name'], $sitename); - $epreamble = sprintf( t('%1$s, you\'ve received [zrl=%2$s]an introduction[/zrl] from %3$s.'), + $preamble = sprintf( t('%1$s, you\'ve received an new connection request from \'%2$s\' at %3$s'), $recip['channel_name'], $sender['xchan_name'], $sitename); + $epreamble = sprintf( t('%1$s, you\'ve received [zrl=%2$s]a new connection request[/zrl] from %3$s.'), $recip['channel_name'], $itemlink, '[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]'); $body = sprintf( t('You may visit their profile at %s'),$sender['xchan_url']); - $sitelink = t('Please visit %s to approve or reject the introduction.'); + $sitelink = t('Please visit %s to approve or reject the connection request.'); $tsitelink = sprintf( $sitelink, $siteurl ); $hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>'); $itemlink = $params['link']; diff --git a/include/zot.php b/include/zot.php index 186f1da10..394563563 100644 --- a/include/zot.php +++ b/include/zot.php @@ -425,6 +425,15 @@ function zot_refresh($them,$channel = null, $force = false) { intval($channel['channel_id']), dbesc($x['hash']) ); + if(($new_connection) && (! $default_perms)) { + require_once('include/enotify.php'); + notification(array( + 'type' => NOTIFY_INTRO, + 'from_xchan' => $x['hash'], + 'to_xchan' => $channel['channel_hash'], + 'link' => z_root() . '/connedit/' . $new_connection[0]['abook_id'], + )); + } if($new_connection && (! ($new_connection[0]['abook_flags'] & ABOOK_FLAG_PENDING)) && ($their_perms & PERMS_R_STREAM)) proc_run('php','include/onepoll.php',$new_connection[0]['abook_id']); |