diff options
author | Eric Wong <e@yhbt.net> | 2020-04-01 06:16:20 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-04-02 10:27:45 +0000 |
commit | 906393b801050e303d2ec2a660c85de4a5fa4740 (patch) | |
tree | 4fcd132c77cd8eecd09eb2007ecfaa252f48e031 /lib/PublicInbox/View.pm | |
parent | eaa56562a0a09d9e8ecf3f2371dda20645bd82f3 (diff) | |
download | public-inbox-906393b801050e303d2ec2a660c85de4a5fa4740.tar.gz |
This allows us to consistently enforce the same Message-ID extraction rules everywhere and makes it easier for us to make changes in the future. Update scripts/ssoma-replay, as well, but don't rely on PublicInbox::* modules in that since it's legacy and public-inbox was never a dependency of ssoma.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r-- | lib/PublicInbox/View.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 5baaffaf..89174296 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -10,7 +10,8 @@ use bytes (); # only for bytes::length use PublicInbox::MsgTime qw(msg_datestamp); use PublicInbox::Hval qw(ascii_html obfuscate_addrs prurl mid_href); use PublicInbox::Linkify; -use PublicInbox::MID qw/id_compress mids mids_for_index references/; +use PublicInbox::MID qw(id_compress mids mids_for_index references + $MID_EXTRACT); use PublicInbox::MsgIter; use PublicInbox::Address; use PublicInbox::WwwStream; @@ -299,7 +300,7 @@ sub _th_index_lite { if (my $smsg = $node->{smsg}) { # delete saves about 200KB on a 1K message thread if (my $refs = delete $smsg->{references}) { - ($$irt) = ($refs =~ m/<([^>]+)>\z/); + ($$irt) = ($refs =~ m/$MID_EXTRACT\z/o); } } my $irt_map = $mapping->{$$irt} if defined $$irt; |