diff --git a/app/Models/Echomail.php b/app/Models/Echomail.php index 7f8dec9..a168e1e 100644 --- a/app/Models/Echomail.php +++ b/app/Models/Echomail.php @@ -10,6 +10,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; use App\Casts\{CollectionOrNull,CompressedString}; +use App\Classes\FTN\Message; use App\Interfaces\Packet; use App\Traits\{MessageAttributes,MsgID,ParseAddresses,QueryCacheableConfig}; @@ -110,7 +111,7 @@ final class Echomail extends Model implements Packet Log::debug(sprintf('%s:^ Message [%d] from point address is [%d]',self::LOGKEY,$model->id,$model->fftn->point_id)); // Make sure our sender is first in the path - if (! $path->contains($model->fftn_id)) { + if ((! $model->isFlagSet(Message::FLAG_LOCAL)) && (! $path->contains($model->fftn_id))) { Log::alert(sprintf('%s:? Echomail adding sender to start of PATH [%s].',self::LOGKEY,$model->fftn_id)); $path->prepend($model->fftn_id); } @@ -141,7 +142,7 @@ final class Echomail extends Model implements Packet $seenby = self::parseAddresses('seenby',$model->set->get('set_seenby'),$model->fftn->zone,$rogue); // Make sure our sender is in the seenby - if (! $seenby->contains($model->fftn_id)) { + if ((! $model->isFlagSet(Message::FLAG_LOCAL)) && (! $seenby->contains($model->fftn_id))) { Log::alert(sprintf('%s:? Echomail adding sender to SEENBY [%s].',self::LOGKEY,$model->fftn_id)); $seenby->push($model->fftn_id); } @@ -182,6 +183,7 @@ final class Echomail extends Model implements Packet ->addresses ->filter(function($item) use ($model) { return $model->echoarea->can_read($item->security); }) ->pluck('id') + ->diff(our_address($model->fftn->zone->domain)) ->diff($seenby); if ($exportto->count()) { diff --git a/resources/views/widgets/message.blade.php b/resources/views/widgets/message.blade.php index 3b08a5b..64cb1cf 100644 --- a/resources/views/widgets/message.blade.php +++ b/resources/views/widgets/message.blade.php @@ -63,7 +63,20 @@ use App\Models\{Echomail,Netmail}; @if ($msg instanceof Echomail)