From 26c47c3e98c616d5afdfe21294036fb2b6b84232 Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Thu, 15 May 2003 21:40:31 -0800 Subject: [PATCH] [project @ 2003-05-15 22:40:31 by cjwatson] If there are multiple messages with the same message-id (e.g. sent to nnn@ and nnn-submitter@), consider all but the first as boring. --- cgi/bugreport.cgi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 8f55221c..897f9d93 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -148,6 +148,8 @@ my $log=''; my $xmessage = 1; my $suppressnext = 0; +my $found_msgid = 0; +my %seen_msgid = (); my $thisheader = ''; my $this = ''; @@ -276,6 +278,7 @@ while(my $line = ) { $xmessage++ if ($normstate ne 'html'); $suppressnext = $normstate eq 'html'; + $found_msgid = 0; } $normstate = $newstate; @@ -298,6 +301,16 @@ while(my $line = ) { $this .= $_; } elsif ($normstate eq 'go') { s/^\030//; + if (!$suppressnext && !$found_msgid && + /^Message-ID: <(.*)>/i) { + my $msgid = $1; + $found_msgid = 1; + if ($seen_msgid{$msgid}) { + $suppressnext = 1; + } else { + $seen_msgid{$msgid} = 1; + } + } if (@mail) { push @mail, $_; } else { @@ -305,6 +318,16 @@ while(my $line = ) { } } elsif ($normstate eq 'go-nox') { next if !s/^X//; + if (!$suppressnext && !$found_msgid && + /^Message-ID: <(.*)>/i) { + my $msgid = $1; + $found_msgid = 1; + if ($seen_msgid{$msgid}) { + $suppressnext = 1; + } else { + $seen_msgid{$msgid} = 1; + } + } if (@mail) { push @mail, $_; } else { -- 2.39.5