From e904206bf5cb23c9e5dede2d9a6a5d3e9cad749a Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Sat, 16 Nov 2024 14:38:06 -0800
Subject: [PATCH] Fix the regex in the parsing of the "References" header field

We only want one Message-ID (we'll use the last, since that appears to be the
message being replied to based on SLRN behavior). This fixes reply linkage
when posing from newsreaders that put multiple message-IDs in the
references header field. This is required for SBBSecho to do its magic
creation of the FTN REPLY kludge during export.

This is the fix that Accession was looking for, I think.
---
 exec/load/newsutil.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec/load/newsutil.js b/exec/load/newsutil.js
index 564f9bc3ef..8382b87771 100755
--- a/exec/load/newsutil.js
+++ b/exec/load/newsutil.js
@@ -170,7 +170,7 @@ function parse_news_header(hdr, line)
 		case "references":
 			hdr.references=data;
 			if(!hdr.reply_id && data.length)
-				hdr.reply_id=data.match(/(?:\S+\s)*(\S+)$/)[1];
+				hdr.reply_id=data.match(/<[^\<]*>$/);
 			break;
 		case "user-agent":
 			hdr.editor=data;
-- 
GitLab