Multiple enhancements to interactive messages, moved messages to Notifications, send netmail back when invalid packet password

This commit is contained in:
2023-07-23 17:27:52 +10:00
parent 9f0fa0a8ec
commit 17fe7e910d
28 changed files with 837 additions and 475 deletions

View File

@@ -130,7 +130,7 @@ final class Netmail extends Model implements Packet
/**
* Return this model as a packet
*/
public function packet(Address $ao): Message
public function packet(Address $ao,string $strippass=NULL): Message
{
Log::debug(sprintf('%s:+ Bundling [%s]',self::LOGKEY,$this->id));
@@ -153,7 +153,7 @@ final class Netmail extends Model implements Packet
$o->tzutc = $this->datetime->utcOffset($this->tzoffset)->getOffsetString('');
$o->user_to = $this->to;
$o->user_from = $this->from;
$o->subject = $this->subject;
$o->subject = (! is_null($strippass)) ? preg_replace('/^'.$strippass.':/','',$this->subject) : $this->subject;
// INTL kludge
$o->intl = sprintf('%s %s',$this->tftn->ftn3d,$this->fftn->ftn3d);