diff options
author | friendica <info@friendica.com> | 2014-03-27 18:03:19 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-03-27 18:03:19 -0700 |
commit | 8594d069a1fd00c0aacb30f544555c26465991c2 (patch) | |
tree | 5000dbf5a88b967624e9ef34e9127a7af30f4bfb /include | |
parent | 1f931c0e3c687d91e53fdf1b6337febc8125bd74 (diff) | |
download | volse-hubzilla-8594d069a1fd00c0aacb30f544555c26465991c2.tar.gz volse-hubzilla-8594d069a1fd00c0aacb30f544555c26465991c2.tar.bz2 volse-hubzilla-8594d069a1fd00c0aacb30f544555c26465991c2.zip |
new connection notification
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']); |