Issue 1234: Add the account name to the notification mails.
This commit is contained in:
parent
546e2809e9
commit
dc47ef65f9
1 changed files with 7 additions and 1 deletions
|
@ -21,6 +21,7 @@ function notification($params) {
|
||||||
$thanks = t('Thank You,');
|
$thanks = t('Thank You,');
|
||||||
$sitename = $a->config['sitename'];
|
$sitename = $a->config['sitename'];
|
||||||
$site_admin = sprintf( t('%s Administrator'), $sitename);
|
$site_admin = sprintf( t('%s Administrator'), $sitename);
|
||||||
|
$nickname = "";
|
||||||
|
|
||||||
$sender_name = $product;
|
$sender_name = $product;
|
||||||
$hostname = $a->get_hostname();
|
$hostname = $a->get_hostname();
|
||||||
|
@ -29,6 +30,10 @@ function notification($params) {
|
||||||
|
|
||||||
$sender_email = t('noreply') . '@' . $hostname;
|
$sender_email = t('noreply') . '@' . $hostname;
|
||||||
|
|
||||||
|
$user = q("SELECT `nickname` FROM `user` WHERE `uid` = %d", intval($params['uid']));
|
||||||
|
if ($user)
|
||||||
|
$nickname = $user[0]["nickname"];
|
||||||
|
|
||||||
// with $params['show_in_notification_page'] == false, the notification isn't inserted into
|
// with $params['show_in_notification_page'] == false, the notification isn't inserted into
|
||||||
// the database, and an email is sent if applicable.
|
// the database, and an email is sent if applicable.
|
||||||
// default, if not specified: true
|
// default, if not specified: true
|
||||||
|
@ -37,6 +42,7 @@ function notification($params) {
|
||||||
$additional_mail_header = "";
|
$additional_mail_header = "";
|
||||||
$additional_mail_header .= "Precedence: list\n";
|
$additional_mail_header .= "Precedence: list\n";
|
||||||
$additional_mail_header .= "X-Friendica-Host: ".$hostname."\n";
|
$additional_mail_header .= "X-Friendica-Host: ".$hostname."\n";
|
||||||
|
$additional_mail_header .= "X-Friendica-Account: <".$nickname."@".$hostname.">\n";
|
||||||
$additional_mail_header .= "X-Friendica-Platform: ".FRIENDICA_PLATFORM."\n";
|
$additional_mail_header .= "X-Friendica-Platform: ".FRIENDICA_PLATFORM."\n";
|
||||||
$additional_mail_header .= "X-Friendica-Version: ".FRIENDICA_VERSION."\n";
|
$additional_mail_header .= "X-Friendica-Version: ".FRIENDICA_VERSION."\n";
|
||||||
$additional_mail_header .= "List-ID: <notification.".$hostname.">\n";
|
$additional_mail_header .= "List-ID: <notification.".$hostname.">\n";
|
||||||
|
@ -344,7 +350,7 @@ function notification($params) {
|
||||||
$show_in_notification_page = false;
|
$show_in_notification_page = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$subject .= " (".$nickname."@".$hostname.")";
|
||||||
|
|
||||||
$h = array(
|
$h = array(
|
||||||
'params' => $params,
|
'params' => $params,
|
||||||
|
|
Loading…
Reference in a new issue