aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/enotify.php6
-rw-r--r--include/zot.php9
-rw-r--r--mod/connedit.php2
3 files changed, 13 insertions, 4 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']);
diff --git a/mod/connedit.php b/mod/connedit.php
index b9b7fcce3..fde116b48 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -298,7 +298,7 @@ function connedit_content(&$a) {
contact_remove(local_user(), $orig_record[0]['abook_id']);
// FIXME - send to clones
- info( t('Contact has been removed.') . EOL );
+ info( t('Connection has been removed.') . EOL );
if(x($_SESSION,'return_url'))
goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']);
goaway($a->get_baseurl(true) . '/contacts');