* [PATCH] searchidx: fallback to lookup on pre-set article numbers
@ 2017-06-23 1:46 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2017-06-23 1:46 UTC (permalink / raw)
To: meta
Yet another hiccup from reusing pre-set article numbers on
various ruby-lang.org mailing lists. This was causing messages
to not appear to NNTP readers which use XOVER.
---
lib/PublicInbox/SearchIdx.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 69b7a6f..0824db0 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -478,7 +478,12 @@ sub unindex_blob {
sub index_mm {
my ($self, $mime) = @_;
- $self->{mm}->mid_insert(mid_clean(mid_mime($mime)));
+ my $mid = mid_clean(mid_mime($mime));
+ my $mm = $self->{mm};
+ my $num = $mm->mid_insert($mid);
+
+ # fallback to num_for since filters like RubyLang set the number
+ defined $num ? $num : $mm->num_for($mid);
}
sub unindex_mm {
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-23 1:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 1:46 [PATCH] searchidx: fallback to lookup on pre-set article numbers Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).