mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 05:35:12 +00:00
new connection notification
This commit is contained in:
parent
1f931c0e3c
commit
8594d069a1
3 changed files with 13 additions and 4 deletions
|
@ -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'];
|
||||
|
|
|
@ -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']);
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue