X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FExtMsg.pm;h=be29974900792f2023b7b7b97b5144b61ee6538c;hb=refs%2Fheads%2Fmaster;hp=b7427b1bcbcaca89836aab1692bf149fab8f3566;hpb=9b2c705f92a6baf33684aa0845dc5163ae31016e;p=public-inbox.git
diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm
index b7427b1b..be299749 100644
--- a/lib/PublicInbox/ExtMsg.pm
+++ b/lib/PublicInbox/ExtMsg.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2021 all contributors
+# Copyright (C) all contributors
# License: AGPL-3.0+
#
# Used by the web interface to link to messages outside of the our
@@ -11,7 +11,7 @@ use warnings;
use PublicInbox::Hval qw(ascii_html prurl mid_href);
use PublicInbox::WwwStream qw(html_oneshot);
use PublicInbox::Smsg;
-our $MIN_PARTIAL_LEN = 16;
+our $MIN_PARTIAL_LEN = 14; # for 'XXXXXXXXXX.fsf' msgids gnus generates
# TODO: user-configurable
our @EXT_URL = map { ascii_html($_) } (
@@ -32,7 +32,7 @@ sub PARTIAL_MAX () { 100 }
sub search_partial ($$) {
my ($ibx, $mid) = @_;
return if length($mid) < $MIN_PARTIAL_LEN;
- my $srch = $ibx->search or return; # NOT ->isrch, we already try ->ALL
+ my $srch = $ibx->isrch or return;
my $opt = { limit => PARTIAL_MAX, relevance => -1 };
my @try = ("m:$mid*");
my $chop = $mid;
@@ -150,7 +150,7 @@ sub ext_msg {
};
}
-# called via PublicInbox::DS->EventLoop
+# called via PublicInbox::DS::event_loop
sub event_step {
my ($ctx, $sync) = @_;
# can't find a partial match in current inbox, try the others:
@@ -233,6 +233,7 @@ sub partial_response ($) {
sub finalize_partial ($) { $_[0]->{-wcb}->(partial_response($_[0])) }
sub ext_urls {
+ return "";
my ($ctx, $mid, $href, $html) = @_;
# Fall back to external repos if configured