Compare commits

...

3 Commits

Author SHA1 Message Date
e6c9bc0058 When decompressing compressed messages, dont barf if we try to decompress the same attribute twice
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m40s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
2024-05-13 15:45:04 +10:00
6c653cf860 Fix recording of netmails, when they contain taglines and origin lines 2024-05-13 15:45:04 +10:00
760995568e Display msgid's smaller for Netmail/Echomail H1 headings 2024-05-13 09:24:35 +10:00
6 changed files with 51 additions and 4 deletions

View File

@ -28,7 +28,13 @@ class CompressedString implements CastsAttributes
? stream_get_contents($value) ? stream_get_contents($value)
: $value; : $value;
// If we get an error decompressing, it might not be zstd (or its already been done)
try {
return $value ? zstd_uncompress(base64_decode($value)) : ''; return $value ? zstd_uncompress(base64_decode($value)) : '';
} catch (\ErrorException $e) {
return $value;
}
} }
/** /**

View File

@ -116,8 +116,12 @@ class MessageProcess implements ShouldQueue
$o->cost = $this->msg->cost; $o->cost = $this->msg->cost;
$o->msgid = $this->msg->msgid; $o->msgid = $this->msg->msgid;
$o->tagline = $this->msg->tagline;
$o->tearline = $this->msg->tearline;
$o->origin = $this->msg->origin;
$o->subject = $this->msg->subject; $o->subject = $this->msg->subject;
$o->msg = $this->msg->message; $o->msg = $this->msg->message_src."\r";
foreach ($this->msg->via as $v) foreach ($this->msg->via as $v)
$o->msg .= sprintf("\01Via %s\r",$v); $o->msg .= sprintf("\01Via %s\r",$v);
@ -372,6 +376,10 @@ class MessageProcess implements ShouldQueue
$o->msgid = $this->msg->msgid; $o->msgid = $this->msg->msgid;
$o->replyid = $this->msg->replyid; $o->replyid = $this->msg->replyid;
$o->tagline = $this->msg->tagline;
$o->tearline = $this->msg->tearline;
$o->origin = $this->msg->origin;
$o->msg = $this->msg->message_src."\r"; $o->msg = $this->msg->message_src."\r";
$o->msg_src = $this->msg->message_src; $o->msg_src = $this->msg->message_src;
$o->msg_crc = md5($this->msg->message); $o->msg_crc = md5($this->msg->message);

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('netmails', function (Blueprint $table) {
$table->string('origin')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('netmail', function (Blueprint $table) {
$table->dropColumn('origin');
});
}
};

View File

@ -134,3 +134,8 @@ h1>small.success:after {
margin-right: 0; margin-right: 0;
margin-left: 0; margin-left: 0;
} }
/* Enable smaller text in h1, but not tiny as used at the float-end */
h1 > small:not(.float-end) {
font-size: 50% !important;
}

View File

@ -6,7 +6,7 @@
@section('content') @section('content')
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<h1>Echomail [{{ $o->msgid ?: '-' }}] <small class="float-end">#{{ $o->id }}</small></h1> <h1>Echomail <small>[{{ $o->msgid ?: '-' }}]</small> <small class="float-end">#{{ $o->id }}</small></h1>
@include('widgets.message',['msg'=>$o]) @include('widgets.message',['msg'=>$o])
</div> </div>

View File

@ -6,7 +6,7 @@
@section('content') @section('content')
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<h1>Netmail [{{ $o->msgid ?: '-' }}] <small class="float-end">#{{ $o->id }}</small></h1> <h1>Netmail <small>[{{ $o->msgid ?: '-' }}]</small> <small class="float-end">#{{ $o->id }}</small></h1>
@include('widgets.message',['msg'=>$o]) @include('widgets.message',['msg'=>$o])
</div> </div>