New Block Notification additions
Adding the block number, finder, amount, and difficulty to the new block notification email
This commit is contained in:
parent
c622d7c69b
commit
91a57903ce
@ -152,11 +152,16 @@ if (empty($aAllBlocks)) {
|
||||
// Notify users
|
||||
$aAccounts = $notification->getNotificationAccountIdByType('new_block');
|
||||
if (is_array($aAccounts)) {
|
||||
|
||||
$finder = $user->getUserName($aBlock['account_id']);
|
||||
foreach ($aAccounts as $aData) {
|
||||
$aMailData['height'] = $aBlock['height'];
|
||||
$aMailData['subject'] = 'New Block';
|
||||
$aMailData['email'] = $user->getUserEmail($user->getUserName($aData['account_id']));
|
||||
$aMailData['shares'] = $iRoundShares;
|
||||
$aMailData['amount'] = $aBlock['amount'];
|
||||
$aMailData['difficulty'] = $aBlock['difficulty'];
|
||||
$aMailData['finder'] = $finder;
|
||||
if (!$notification->sendNotification($aData['account_id'], 'new_block', $aMailData))
|
||||
$log->logError('Failed to notify user of new found block: ' . $user->getUserName($aData['account_id']));
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<p>Block Number {nocache}{$DATA.height}{/nocache} has been discovered by {nocache}{$DATA.finder}{/nocache} with a total value of {nocache}{$DATA.amount}{/nocache}! The current difficulty is {nocache}{$DATA.difficulty}{/nocache}.</p>
|
||||
<body>
|
||||
<p>A new block has been discovered!</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</body>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user