Fix echoarea name is converted to UC, add netmail VIA lines for outgoing netmail
This commit is contained in:
@@ -34,7 +34,6 @@ final class Netmail extends Model implements Packet
|
||||
public function fftn()
|
||||
{
|
||||
return $this
|
||||
->setConnection('pgsql')
|
||||
->belongsTo(Address::class)
|
||||
->withTrashed();
|
||||
}
|
||||
@@ -42,7 +41,6 @@ final class Netmail extends Model implements Packet
|
||||
public function tftn()
|
||||
{
|
||||
return $this
|
||||
->setConnection('pgsql')
|
||||
->belongsTo(Address::class);
|
||||
}
|
||||
|
||||
@@ -83,17 +81,20 @@ final class Netmail extends Model implements Packet
|
||||
if ($this->replyid)
|
||||
$o->replyid = $this->replyid;
|
||||
|
||||
$o->kludge->put('dbid',$this->id);
|
||||
|
||||
$o->message = $this->msg;
|
||||
$o->tagline = $this->tagline;
|
||||
$o->tearline = $this->tearline;
|
||||
|
||||
// VIA kludge
|
||||
$sysaddress = Setup::findOrFail(config('app.id'))->system->match($this->fftn->zone)->first();
|
||||
$via = $this->via ?: collect();
|
||||
$via->push(
|
||||
sprintf('%s @%s.UTC %s %d.%d/%s %s',
|
||||
$this->fftn->ftn3d,
|
||||
$sysaddress->ftn3d,
|
||||
Carbon::now()->utc()->format('Ymd.His'),
|
||||
Setup::PRODUCT_NAME,
|
||||
str_replace(' ','_',Setup::PRODUCT_NAME),
|
||||
Setup::PRODUCT_VERSION_MAJ,
|
||||
Setup::PRODUCT_VERSION_MIN,
|
||||
(new Setup)->version,
|
||||
|
Reference in New Issue
Block a user