diff options
Diffstat (limited to 'lib/PublicInbox/SearchMsg.pm')
-rw-r--r-- | lib/PublicInbox/SearchMsg.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index 53882f73..ea54ba8a 100644 --- a/lib/PublicInbox/SearchMsg.pm +++ b/lib/PublicInbox/SearchMsg.pm @@ -92,10 +92,11 @@ sub psgi_cull ($) { } # Only called by PSGI interface, not NNTP -sub load_doc { - my ($class, $doc) = @_; - my $self = bless {}, $class; - psgi_cull(load_expand($self, $doc)); +sub from_mitem { + my ($mitem, $srch) = @_; + return $srch->retry_reopen(\&from_mitem, $mitem) if $srch; + my $self = bless {}, __PACKAGE__; + psgi_cull(load_expand($self, $mitem->get_document)); } # :bytes and :lines metadata in RFC 3977 |