Complete rework of packet parsing and packet generation
This commit is contained in:
@@ -41,6 +41,6 @@ class EchomailChannel
|
||||
|
||||
$o = $notification->toEchomail($notifiable);
|
||||
|
||||
Log::info(sprintf('%s:= Posted echomail [%s] to [%s]',self::LOGKEY,$o->msgid,$echoarea));
|
||||
Log::info(sprintf('%s:= Posted echomail (%d) [%s] to [%s]',self::LOGKEY,$o->id,$o->msgid,$echoarea));
|
||||
}
|
||||
}
|
@@ -41,6 +41,6 @@ class NetmailChannel
|
||||
|
||||
$o = $notification->toNetmail($notifiable);
|
||||
|
||||
Log::info(sprintf('%s:= Sent netmail [%s] to [%s]',self::LOGKEY,$o->msgid,$ao->ftn));
|
||||
Log::info(sprintf('%s:= Sent netmail (%d) [%s] to [%s]',self::LOGKEY,$o->id,$o->msgid,$ao->ftn));
|
||||
}
|
||||
}
|
@@ -52,13 +52,14 @@ abstract class Netmails extends Notification //implements ShouldQueue
|
||||
$ao = $notifiable->routeNotificationFor(static::via);
|
||||
|
||||
$o = new Netmail;
|
||||
$o->set_sender = our_address($ao);
|
||||
$o->to = $ao->system->sysop;
|
||||
$o->from = Setup::PRODUCT_NAME;
|
||||
|
||||
$o->datetime = Carbon::now();
|
||||
$o->tzoffset = $o->datetime->utcOffset();
|
||||
|
||||
$o->fftn_id = our_address($ao)->id;
|
||||
$o->fftn_id = $o->set->get('set_sender')->id;
|
||||
$o->tftn_id = $ao->id;
|
||||
$o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE);
|
||||
$o->cost = 0;
|
||||
|
@@ -7,7 +7,7 @@ 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 EchoareaNotExist extends Netmails
|
||||
@@ -16,14 +16,14 @@ class EchoareaNotExist extends Netmails
|
||||
|
||||
private const LOGKEY = 'NNW';
|
||||
|
||||
private Message $mo;
|
||||
private Echomail $mo;
|
||||
|
||||
/**
|
||||
* Send a sysop a message if they attempt to write to an area that doesnt exist.
|
||||
*
|
||||
* @param Message $mo
|
||||
*/
|
||||
public function __construct(Message $mo)
|
||||
public function __construct(Echomail $mo)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
@@ -44,7 +44,7 @@ class EchoareaNotExist extends Netmails
|
||||
|
||||
Log::info(sprintf('%s:+ Creating ECHOMAIL NOT EXIST netmail to [%s]',self::LOGKEY,$ao->ftn));
|
||||
|
||||
$o->subject = 'Echoarea doesnt exist - '.$this->mo->echoarea;
|
||||
$o->subject = 'Echoarea doesnt exist - '.$this->mo->set->get('set_echoarea');
|
||||
|
||||
// Message
|
||||
$msg = $this->page(FALSE,'nothere');
|
||||
@@ -52,7 +52,7 @@ class EchoareaNotExist extends Netmails
|
||||
$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(),
|
||||
)
|
||||
|
Reference in New Issue
Block a user