mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
notify_intro
This commit is contained in:
parent
356c05c6b3
commit
5c7df6e964
3 changed files with 40 additions and 19 deletions
|
@ -15,8 +15,13 @@ function notification($params) {
|
|||
$sender_name = t('Administrator');
|
||||
$sender_email = t('noreply') . '@' . $a->get_hostname();
|
||||
|
||||
$title = $params['item']['title'];
|
||||
$body = $params['item']['body'];
|
||||
if(in_array('item',$params)) {
|
||||
$title = $params['item']['title'];
|
||||
$body = $params['item']['body'];
|
||||
}
|
||||
else {
|
||||
$title = $body = '';
|
||||
}
|
||||
|
||||
if($params['type'] == NOTIFY_MAIL) {
|
||||
|
||||
|
@ -49,6 +54,24 @@ function notification($params) {
|
|||
$itemlink = $params['link'];
|
||||
}
|
||||
|
||||
if($params['type'] == NOTIFY_INTRO) {
|
||||
$subject = sprintf( t('Introduction received at %s'), $sitename);
|
||||
$preamble = sprintf( t('You\'ve received an introduction from \'%s\' at %s'), $params['source_name'], $sitename);
|
||||
$body = sprintf( t('You may visit their profile at %s'),$params['source_link']);
|
||||
|
||||
$sitelink = t('Please visit %s to approve or reject the introduction.');
|
||||
$tsitelink = sprintf( $sitelink, $siteurl );
|
||||
$hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>');
|
||||
$itemlink = $params['link'];
|
||||
}
|
||||
|
||||
if($params['type'] == NOTIFY_CONFIRM) {
|
||||
|
||||
}
|
||||
|
||||
// TODO - create notification entry in DB
|
||||
|
||||
|
||||
|
||||
// send email notification if notification preferences permit
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue