Code improvement to our_address(), reducing arguments

This commit is contained in:
2024-04-21 21:40:55 +10:00
parent 1c270025cf
commit bba6f93fbc
9 changed files with 39 additions and 20 deletions

View File

@@ -60,7 +60,7 @@ abstract class Echomails extends Notification //implements ShouldQueue
$o->datetime = Carbon::now();
$o->tzoffset = $o->datetime->utcOffset();
$o->fftn_id = ($x=our_address($mo->fboss_o->zone->domain,$mo->fboss_o))->id;
$o->fftn_id = ($x=our_address($mo->fboss_o))->id;
$o->flags = (Message::FLAG_LOCAL);
$o->tearline = sprintf('%s (%04X)',Setup::PRODUCT_NAME,Setup::PRODUCT_ID);

View File

@@ -48,6 +48,7 @@ abstract class Netmails extends Notification //implements ShouldQueue
protected function setupNetmail(object $notifiable): Netmail
{
// @todo Redirect netmails to Hubs or higher to the admin
$ao = $notifiable->routeNotificationFor(static::via);
$o = new Netmail;
@@ -57,7 +58,7 @@ abstract class Netmails extends Notification //implements ShouldQueue
$o->datetime = Carbon::now();
$o->tzoffset = $o->datetime->utcOffset();
$o->fftn_id = our_address($ao->zone->domain,$ao)->id;
$o->fftn_id = our_address($ao)->id;
$o->tftn_id = $ao->id;
$o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE);
$o->cost = 0;