Fix addressing when forwarding netmail, as well as fix content being prefixed with forward notice.
This commit is contained in:
parent
ac687efe51
commit
8396866280
@ -506,9 +506,6 @@ class Message extends FTNBase
|
|||||||
$return .= $this->mo->subject."\00";
|
$return .= $this->mo->subject."\00";
|
||||||
|
|
||||||
if (($this->mo instanceof Netmail) && $this->mo->isFlagSet(self::FLAG_LOCAL)) {
|
if (($this->mo instanceof Netmail) && $this->mo->isFlagSet(self::FLAG_LOCAL)) {
|
||||||
// If there isnt an INTL kludge, we'll add it
|
|
||||||
if (! $this->mo->kludges->has('INTL'))
|
|
||||||
$this->mo->kludges->put('INTL',sprintf('%s %s',$this->mo->tftn->ftn3d,$this->mo->fftn->ftn3d));
|
|
||||||
|
|
||||||
if ((! $this->mo->kludges->has('FMPT')) && $this->mo->fftn->point_id)
|
if ((! $this->mo->kludges->has('FMPT')) && $this->mo->fftn->point_id)
|
||||||
$this->mo->kludges->put('FMPT',$this->mo->fftn->point_id);
|
$this->mo->kludges->put('FMPT',$this->mo->fftn->point_id);
|
||||||
@ -523,6 +520,10 @@ class Message extends FTNBase
|
|||||||
if ($this->mo instanceof Echomail)
|
if ($this->mo instanceof Echomail)
|
||||||
$return .= sprintf("AREA:%s\r",strtoupper($this->mo->echoarea->name));
|
$return .= sprintf("AREA:%s\r",strtoupper($this->mo->echoarea->name));
|
||||||
|
|
||||||
|
// Rebuild the INTL kludge line
|
||||||
|
elseif ($this->mo instanceof Netmail)
|
||||||
|
$this->mo->kludges->put('INTL',sprintf('%s %s',$this->mo->tftn->ftn3d,$this->mo->fftn->ftn3d));
|
||||||
|
|
||||||
// Add some kludges
|
// Add some kludges
|
||||||
$return .= sprintf("\01TZUTC: %s\r",str_replace('+','',$this->mo->date->getOffsetString('')));
|
$return .= sprintf("\01TZUTC: %s\r",str_replace('+','',$this->mo->date->getOffsetString('')));
|
||||||
|
|
||||||
|
@ -137,12 +137,19 @@ class MessageProcess implements ShouldQueue
|
|||||||
->single();
|
->single();
|
||||||
|
|
||||||
if ($uo && ($ao=$uo->system->match($this->mo->tftn->zone)?->pop())) {
|
if ($uo && ($ao=$uo->system->match($this->mo->tftn->zone)?->pop())) {
|
||||||
|
Log::info(sprintf('%s:- Forwarding Netmail [%s] to (%s) [%s] from (%s) [%s].',
|
||||||
|
self::LOGKEY,
|
||||||
|
$this->mo->msgid ?: '*NO MSGID*',
|
||||||
|
$this->mo->to,$ao->ftn,
|
||||||
|
$this->mo->from,$this->mo->fftn->ftn,
|
||||||
|
));
|
||||||
|
|
||||||
$note = "+--[ FORWARDED MESSAGE ]----------------------------------+\r";
|
$note = "+--[ FORWARDED MESSAGE ]----------------------------------+\r";
|
||||||
$note .= "+ This message has been forwarded to you, it was originally sent to you\r";
|
$note .= "+ This message has been forwarded to you, it was originally sent to you\r";
|
||||||
$note .= sprintf("+ at [%s]\r",$this->mo->tftn->ftn);
|
$note .= sprintf("+ at [%s]\r",$this->mo->tftn->ftn);
|
||||||
$note .= "+---------------------------------------------------------+\r\r";
|
$note .= "+---------------------------------------------------------+\r\r";
|
||||||
|
|
||||||
$this->mo->msg = $note.$this->mo->content;
|
$this->mo->msg_src = $note.$this->mo->content;
|
||||||
$this->mo->tftn_id = $ao->id;
|
$this->mo->tftn_id = $ao->id;
|
||||||
$this->mo->flags |= Message::FLAG_INTRANSIT;
|
$this->mo->flags |= Message::FLAG_INTRANSIT;
|
||||||
$this->mo->save();
|
$this->mo->save();
|
||||||
|
Loading…
Reference in New Issue
Block a user