Fix netmail flags for netmails originating here

This commit is contained in:
Deon George 2023-07-20 23:12:26 +10:00
parent 8d9bde9692
commit 02a3963a12
5 changed files with 24 additions and 7 deletions

View File

@ -52,22 +52,39 @@ class Message extends FTNBase
];
// Flags for messages
/** @var int Private message */
public const FLAG_PRIVATE = 1<<0;
/** @var int Crash priority message (Crash + Hold = Direct) */
public const FLAG_CRASH = 1<<1;
/** @var int Read by addressee */
public const FLAG_RECD = 1<<2;
/** @var int Message has been sent */
public const FLAG_SENT = 1<<3;
/** @var int File attached (filename in subject) */
public const FLAG_FILEATTACH = 1<<4;
/** @var int Message in transit to another destination */
public const FLAG_INTRANSIT = 1<<5;
/** @var int Unknown destination - node not in nodelist */
public const FLAG_ORPHAN = 1<<6;
/** @var int Kill after mailing */
public const FLAG_KILLSENT = 1<<7;
/** @var int Message originated here */
public const FLAG_LOCAL = 1<<8;
/** @var int Hold message here to be collected (Crash + Hold = Direct) */
public const FLAG_HOLD = 1<<9;
/** @var int Reserved for future use by FTS-0001 */
public const FLAG_UNUSED_10 = 1<<10;
/** @var int Requesting a file (filename in subject) */
public const FLAG_FREQ = 1<<11;
public const FLAG_RETRECEIPT = 1<<12;
/** @var int Return Receipt requested */
public const FLAG_RETRECEIPT = 1<<12; // (RRQ)
/** @var int Return Receipt message in response to an RRQ */
public const FLAG_ISRETRECEIPT = 1<<13;
public const FLAG_AUDITREQ = 1<<14;
public const FLAG_FILEUPDATEREQ = 1<<15;
/** @var int Request audit trail */
public const FLAG_AUDITREQ = 1<<14; // (ARQ)
/** @var int Requesting a file update (filename in subject) */
public const FLAG_FILEUPDATEREQ = 1<<15; // (URQ)
/** Echomail has been scanned out */
public const FLAG_ECHOMAIL = 1<<16;
// FTS-0001.016 Message header 32 bytes node, net, flags, cost, date

View File

@ -53,7 +53,7 @@ final class Ping extends Process
$o->replyid = $msg->msgid;
$o->fftn_id = $ftns->id;
$o->tftn_id = ($x=$msg->fftn_o) ? $x->id : NULL;
$o->flags = Message::FLAG_LOCAL;
$o->flags = Message::FLAG_LOCAL|Message::FLAG_PRIVATE;
$o->cost = 0;
$o->msg = static::format_msg($reply,self::$logo);

View File

@ -169,7 +169,7 @@ class MessageProcess implements ShouldQueue
$o->tzoffset = $this->msg->date->utcOffset();
$o->cost = 0;
$o->flags = Message::FLAG_LOCAL;
$o->flags = Message::FLAG_LOCAL|Message::FLAG_PRIVATE;
$o->fftn_id = ($x=$this->msg->tftn_o) ? $x->id : NULL;
$o->tftn_id = ($x=$this->msg->fftn_o) ? $x->id : NULL;

View File

@ -68,7 +68,7 @@ class AddressLink extends Notification //implements ShouldQueue
$o->fftn_id = $so->match($this->ao->zone)->first()->id;
$o->tftn_id = $this->ao->id;
$o->flags = Message::FLAG_LOCAL;
$o->flags = Message::FLAG_LOCAL|Message::FLAG_PRIVATE|Message::FLAG_CRASH;
$o->cost = 0;
$o->tagline = 'Address Linking...';

View File

@ -65,7 +65,7 @@ class NetmailTest extends Notification //implements ShouldQueue
$o->fftn_id = $so->match($this->ao->zone)->first()->id;
$o->tftn_id = $this->ao->id;
$o->flags = Message::FLAG_LOCAL;
$o->flags = Message::FLAG_LOCAL|Message::FLAG_PRIVATE;
$o->cost = 0;
$o->tagline = 'Testing, testing, 1 2 3.';