Complete rework of packet parsing and packet generation
This commit is contained in:
@@ -5,7 +5,8 @@ namespace App\Classes\FTN\Process\Echomail;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Classes\FTN\{Message,Process};
|
||||
use App\Classes\FTN\Process;
|
||||
use App\Models\{Echomail,Netmail};
|
||||
use App\Notifications\Echomails\Test as TestNotification;
|
||||
|
||||
/**
|
||||
@@ -19,16 +20,16 @@ final class Test extends Process
|
||||
|
||||
private const testing = ['test','testing'];
|
||||
|
||||
public static function handle(Message $msg): bool
|
||||
public static function handle(Echomail|Netmail $mo): bool
|
||||
{
|
||||
if (! self::canProcess($msg->echoarea)
|
||||
|| (strtolower($msg->user_to) !== 'all')
|
||||
|| (! in_array(strtolower($msg->subject),self::testing)))
|
||||
if (! self::canProcess($mo->echoarea)
|
||||
|| (strtolower($mo->to) !== 'all')
|
||||
|| (! in_array(strtolower($mo->subject),self::testing)))
|
||||
return FALSE;
|
||||
|
||||
Log::info(sprintf('%s:- Processing TEST message from (%s) [%s] in [%s]',self::LOGKEY,$msg->user_from,$msg->fftn,$msg->echoarea));
|
||||
|
||||
Notification::route('echomail',$msg->echoarea)->notify(new TestNotification($msg));
|
||||
Notification::route('echomail',$mo->echoarea)->notify(new TestNotification($msg));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user