]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchView.pm
view: depend on SearchMsg for Message-ID
[public-inbox.git] / lib / PublicInbox / SearchView.pm
index 55c588cb2285dd31048e0bf84cc476cbbcd1a8e6..1a8fe7f7f1681eb8b1a7fe459b5c28192ccd4225 100644 (file)
@@ -10,7 +10,7 @@ use PublicInbox::SearchMsg;
 use PublicInbox::Hval qw/ascii_html obfuscate_addrs/;
 use PublicInbox::View;
 use PublicInbox::WwwAtomStream;
-use PublicInbox::MID qw(mid2path mid_mime mid_clean mid_escape MID_ESC);
+use PublicInbox::MID qw(MID_ESC);
 use PublicInbox::MIME;
 require PublicInbox::Git;
 require PublicInbox::SearchThread;
@@ -248,15 +248,14 @@ sub mset_thread {
                *PublicInbox::View::pre_thread);
 
        @$msgs = reverse @$msgs if $r;
-       my $mime;
        sub {
                return unless $msgs;
-               while ($mime = pop @$msgs) {
-                       $mime = $inbox->msg_by_smsg($mime) and last;
+               my $smsg;
+               while (my $m = pop @$msgs) {
+                       $smsg = $inbox->smsg_mime($m) and last;
                }
-               if ($mime) {
-                       $mime = PublicInbox::MIME->new($mime);
-                       return PublicInbox::View::index_entry($mime, $ctx,
+               if ($smsg) {
+                       return PublicInbox::View::index_entry($smsg, $ctx,
                                scalar @$msgs);
                }
                $msgs = undef;
@@ -290,8 +289,7 @@ sub adump {
        PublicInbox::WwwAtomStream->response($ctx, 200, sub {
                while (my $x = shift @items) {
                        $x = load_doc_retry($srch, $x);
-                       $x = $ibx->msg_by_smsg($x) and
-                                       return PublicInbox::MIME->new($x);
+                       $x = $ibx->smsg_mime($x) and return $x;
                }
                return undef;
        });