diff --git a/app/Jobs/MessageProcess.php b/app/Jobs/MessageProcess.php index e29fed2..8ece903 100644 --- a/app/Jobs/MessageProcess.php +++ b/app/Jobs/MessageProcess.php @@ -14,17 +14,21 @@ use Illuminate\Support\Facades\Notification; use App\Classes\FTN\Message; use App\Models\{Echomail,Netmail,User}; use App\Notifications\Netmails\{EchoareaNotExist,EchoareaNotSubscribed,EchoareaNoWrite,NetmailForward,NetmailHubNoUser}; -use App\Traits\ParseAddresses; +use App\Traits\{EncodeUTF8,ParseAddresses}; class MessageProcess implements ShouldQueue { private const LOGKEY = 'JMP'; - use Dispatchable,InteractsWithQueue,Queueable,SerializesModels,ParseAddresses; + use Dispatchable,InteractsWithQueue,Queueable,SerializesModels,ParseAddresses,EncodeUTF8; private Echomail|Netmail|string $mo; private bool $skipbot; + private const cast_utf8 = [ + 'mo', + ]; + /** * Process a message from a packet * @@ -50,6 +54,16 @@ class MessageProcess implements ShouldQueue } } + public function __serialize() + { + return $this->encode(); + } + + public function __unserialize(array $values) + { + $this->decode($values); + } + /** * At this point, we know that the packet is from a system we know about, and the packet is to us: * + From a system that is configured with us, and the password has been validated