diff --git a/app/Classes/FTN/Process/Echomail/Test.php b/app/Classes/FTN/Process/Echomail/Test.php index 11e1a71..f7dcee7 100644 --- a/app/Classes/FTN/Process/Echomail/Test.php +++ b/app/Classes/FTN/Process/Echomail/Test.php @@ -60,6 +60,7 @@ final class Test extends Process $eo = Echoarea::where('name',$msg->echoarea)->single(); $o = new Echomail; + $o->init(); $o->to = $msg->user_from; $o->from = Setup::PRODUCT_NAME; $o->subject = 'Test Reply'; diff --git a/app/Jobs/MessageProcess.php b/app/Jobs/MessageProcess.php index 2ffcb9b..2c08eee 100644 --- a/app/Jobs/MessageProcess.php +++ b/app/Jobs/MessageProcess.php @@ -205,6 +205,8 @@ class MessageProcess implements ShouldQueue // We know about this area, store it $o = new Echomail; + $o->init(); + $o->to = $this->msg->user_to; $o->from = $this->msg->user_from; $o->subject = $this->msg->subject; diff --git a/app/Models/Echomail.php b/app/Models/Echomail.php index 2a70788..f6ec250 100644 --- a/app/Models/Echomail.php +++ b/app/Models/Echomail.php @@ -140,6 +140,13 @@ final class Echomail extends Model implements Packet /* METHODS */ + public function init(): void + { + $this->set_path = collect(); + $this->set_seenby = collect(); + $this->set_packet = NULL; + } + public function jsonSerialize(): array { return $this->encode();