]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extsearch: wire up smsg_eml
authorEric Wong <e@80x24.org>
Tue, 27 Oct 2020 07:54:47 +0000 (07:54 +0000)
committerEric Wong <e@80x24.org>
Sat, 7 Nov 2020 10:22:07 +0000 (10:22 +0000)
We'll probably still need synchronous message retrieval
in a few places (tests, at least).

lib/PublicInbox/ExtSearch.pm
lib/PublicInbox/Inbox.pm

index 8997cd54da4e25c1186b9be9cf320f15ac553854..3e8ca82c65c79cf443240674bae672040eeea0ef 100644 (file)
@@ -7,6 +7,7 @@ package PublicInbox::ExtSearch;
 use strict;
 use v5.10.1;
 use PublicInbox::Over;
+use PublicInbox::Inbox;
 
 # for ->reopen, ->mset, ->mset_to_artnums
 use parent qw(PublicInbox::Search);
@@ -37,4 +38,7 @@ sub git {
        $self->{git} //= PublicInbox::Git->new("$self->{topdir}/ALL.git");
 }
 
+no warnings 'once';
+*smsg_eml = \&PublicInbox::Inbox::smsg_eml;
+
 1;
index cbb95b8d6204ef756c9b551d9388954e2300c9dc..cd5c098a1b28aee65b9b25d289823101c74d7fd8 100644 (file)
@@ -331,7 +331,7 @@ sub msg_by_smsg ($$) {
        return unless defined $smsg;
        defined(my $blob = $smsg->{blob}) or return;
 
-       git($self)->cat_file($blob);
+       $self->git->cat_file($blob);
 }
 
 sub smsg_eml {