More complete rework of packet parsing and packet generation with 29710c

This commit is contained in:
2024-05-19 23:28:45 +10:00
parent 46f52dd56d
commit f279d85b08
43 changed files with 412 additions and 291 deletions

View File

@@ -5,9 +5,8 @@ namespace App\Notifications\Netmails;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
use App\Classes\FTN\Message;
use App\Notifications\Netmails;
use App\Models\{Netmail,System};
use App\Models\{Echomail,Netmail};
use App\Traits\{MessagePath,PageTemplate};
class EchoareaNotSubscribed extends Netmails
@@ -16,14 +15,14 @@ class EchoareaNotSubscribed extends Netmails
private const LOGKEY = 'NNW';
private Message $mo;
private Echomail $mo;
/**
* Send a sysop a message if they write to an area that they hadnt previously subscribed to.
*
* @param Message $mo
* @param Echomail $mo
*/
public function __construct(Message $mo)
public function __construct(Echomail $mo)
{
parent::__construct();
@@ -42,17 +41,17 @@ class EchoareaNotSubscribed extends Netmails
$o = $this->setupNetmail($notifiable);
$ao = $notifiable->routeNotificationFor(static::via);
Log::info(sprintf('%s:+ Creating ECHOMAIL NOT SUBSCRIBED netmail to [%s]',self::LOGKEY,$ao->ftn));
Log::info(sprintf('%s:+ Creating ECHOAREA NOT SUBSCRIBED netmail to [%s]',self::LOGKEY,$ao->ftn));
$o->subject = 'Echoarea not subscribed - '.$this->mo->echoarea;
$o->subject = 'Echoarea not subscribed - '.$this->mo->echoarea->name;
// Message
$msg = $this->page(FALSE,'nothere');
$msg = $this->page(FALSE,'nosub');
$msg->addText(
sprintf("Your echomail with ID [%s] to [%s] here was received here on [%s] and it looks like you sent it on [%s].\r\r",
$this->mo->msgid,
$this->mo->user_to,
$this->mo->to,
Carbon::now()->utc()->toDateTimeString(),
$this->mo->date->utc()->toDateTimeString(),
)