From f1780e61ea4e6fe772afe864622cbd319fd82a25 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 29 Nov 2021 21:12:44 +1100 Subject: [PATCH] Some messages have the origin in the middle of the message - change strpos to strrpos --- app/Classes/FTN/Message.php | 2 +- app/Models/Echomail.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Classes/FTN/Message.php b/app/Classes/FTN/Message.php index f6f1f66..8a1c45a 100644 --- a/app/Classes/FTN/Message.php +++ b/app/Classes/FTN/Message.php @@ -701,7 +701,7 @@ class Message extends FTNBase } // Anything after the origin line is also kludge data. - if ($originpos = strpos($kl,"\r * Origin: ")) { + if ($originpos = strrpos($kl,"\r * Origin: ")) { if (! $this->message) { $this->message .= substr($kl,$retpos+1,$originpos-$retpos-1); $this->parseOrigin(substr($kl,$originpos+1)); diff --git a/app/Models/Echomail.php b/app/Models/Echomail.php index 960b80c..539a827 100644 --- a/app/Models/Echomail.php +++ b/app/Models/Echomail.php @@ -37,6 +37,7 @@ final class Echomail extends Model implements Packet { parent::boot(); + // @todo if the message is updated with new SEEN-BY's from another route, we'll delete the pending export for systems (if there is one) static::created(function($model) { if (! $model->echoarea_id) { Log::alert(sprintf('%s:- Message has no echo area, no exporting',self::LOGKEY,$model->id));