Fix MSGID parsing when it has more than the FTN address

This commit is contained in:
Deon George 2021-08-22 11:00:41 +10:00
parent 8c992ad0f9
commit cab402d146

View File

@ -740,8 +740,10 @@ class Message extends FTNBase
// Work out our zone/point
// http://ftsc.org/docs/fsc-0068.001
// MSGID should be the basis of the source, we'll overrite our src from origin if we have it
if ($this->msgid)
$this->src = Address::parseFTN(strstr($this->msgid,' ',TRUE));
$m = [];
if ($this->msgid && preg_match('#([0-9]+:[0-9]+/[0-9]+)?\.?([0-9]+)?(@%s)?\ +#',$this->msgid,$m)) {
$this->src = Address::parseFTN($m[1].(isset($m[2]) ? '.'.$m[2] : ''));
}
// Parse SEEN-BY
if ($this->seenby->count())