Correctly storing netmail flags (intransit, local, recv) with senders ID and packet name
This commit is contained in:
@@ -191,7 +191,7 @@ class Address extends Model
|
||||
public function echomails()
|
||||
{
|
||||
return $this->belongsToMany(Echomail::class,'echomail_seenby')
|
||||
->withPivot(['sent_at','export_at','packet']);
|
||||
->withPivot(['export_at','sent_at','sent_pkt']);
|
||||
}
|
||||
|
||||
public function echomail_from()
|
||||
@@ -743,6 +743,6 @@ class Address extends Model
|
||||
*/
|
||||
public function session(string $type): ?string
|
||||
{
|
||||
return ($x=$this->system->sessions->where('id',$this->zone_id)->first()) ? $x->pivot->{$type} : NULL;
|
||||
return ($this->exists && ($x=$this->system->sessions->where('id',$this->zone_id)->first())) ? $x->pivot->{$type} : NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user