Further enhancement with #9063a2a - to ensure our message addressing and content picks the right address

This commit is contained in:
2023-12-18 15:13:16 +11:00
parent 1ded66990c
commit 13e51724c0
34 changed files with 68 additions and 93 deletions

View File

@@ -40,14 +40,13 @@ abstract class Netmails extends Notification //implements ShouldQueue
/**
* Get the mail representation of the notification.
*
* @param System $so
* @param mixed $notifiable
* @return Netmail
* @throws \Exception
*/
abstract public function toNetmail(System $so,object $notifiable): Netmail;
abstract public function toNetmail(object $notifiable): Netmail;
protected function setupNetmail(System $so,object $notifiable): Netmail
protected function setupNetmail(object $notifiable): Netmail
{
$ao = $notifiable->routeNotificationFor(static::via);
@@ -58,7 +57,7 @@ abstract class Netmails extends Notification //implements ShouldQueue
$o->datetime = Carbon::now();
$o->tzoffset = $o->datetime->utcOffset();
$o->fftn_id = $so->match($ao->zone)->first()->id;
$o->fftn_id = our_address($ao->zone->domain,$ao);
$o->tftn_id = $ao->id;
$o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE);
$o->cost = 0;