More complete rework of packet parsing and packet generation with 29710c
This commit is contained in:
@@ -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 EchoareaNoWrite extends Netmails
|
||||
@@ -16,14 +15,14 @@ class EchoareaNoWrite 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 they dont have permission.
|
||||
*
|
||||
* @param Message $mo
|
||||
* @param Echomail $mo
|
||||
*/
|
||||
public function __construct(Message $mo)
|
||||
public function __construct(Echomail $mo)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
@@ -42,9 +41,9 @@ class EchoareaNoWrite extends Netmails
|
||||
$o = $this->setupNetmail($notifiable);
|
||||
$ao = $notifiable->routeNotificationFor(static::via);
|
||||
|
||||
Log::info(sprintf('%s:+ Creating ECHOMAIL NO WRITE netmail to [%s]',self::LOGKEY,$ao->ftn));
|
||||
Log::info(sprintf('%s:+ Creating ECHOAREA NO WRITE netmail to [%s]',self::LOGKEY,$ao->ftn));
|
||||
|
||||
$o->subject = 'Echomail rejected - '.$this->mo->msgid;
|
||||
$o->subject = sprintf('Echomail #%s rejected to %s',$this->mo->msgid,$this->mo->echoarea->name);
|
||||
|
||||
// Message
|
||||
$msg = $this->page(FALSE,'nowrite');
|
||||
@@ -52,13 +51,13 @@ class EchoareaNoWrite 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(),
|
||||
)
|
||||
);
|
||||
|
||||
$msg->addText(sprintf("It appears that you do not have permission to post in this echoarea using the address [%s], so the message from your system was rejected.\r\r",$ao->ftn));
|
||||
$msg->addText(sprintf("It appears that you do not have permission to post in [%s] using the address [%s], so the message from your system was rejected.\r\r",$this->mo->echoarea->name,$ao->ftn));
|
||||
$msg->addText("Please contact the ZC if you think this is a mistake.\r\r");
|
||||
|
||||
$msg->addText($this->message_path($this->mo));
|
||||
|
Reference in New Issue
Block a user