Updates now that we have updated our_address() to differentiate public/mailer advertised addresses with all our addresses
This commit is contained in:
@@ -1024,7 +1024,7 @@ class Address extends Model
|
||||
public function downlinks(): Collection
|
||||
{
|
||||
// We have no session data for this address, (and its not our address), by definition it has no children
|
||||
if (! $this->is_hosted && (! our_address()->pluck('id')->contains($this->id)))
|
||||
if (! $this->is_hosted && (! our_address(NULL,FALSE)->pluck('id')->contains($this->id)))
|
||||
return new Collection;
|
||||
|
||||
// If this system is not marked to default route for this address
|
||||
|
@@ -184,12 +184,14 @@ 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
|
||||
// @todo we need to capture the path for mail directly from points so we dont re-export to it.
|
||||
if (($model->fftn->point_id === 0) && (! $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);
|
||||
}
|
||||
|
||||
// Make sure our pktsrc is last in the path
|
||||
// @todo mail directly from points may have a blank path, so we need to make one up.
|
||||
if ($model->set->has('set_sender') && (! $path->contains($model->set->get('set_sender')->id)) && ($model->set->get('set_sender')->point_id === 0)) {
|
||||
Log::alert(sprintf('%s:? Echomail adding pktsrc to end of PATH [%s].',self::LOGKEY,$model->set->get('set_sender')->ftn));
|
||||
$path->push($model->set->get('set_sender')->id);
|
||||
@@ -257,7 +259,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)->pluck('id'))
|
||||
->diff(our_address($model->fftn->zone->domain,FALSE)->pluck('id'))
|
||||
->diff($seenby);
|
||||
|
||||
if ($exportto->count()) {
|
||||
|
Reference in New Issue
Block a user