]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WWW.pm
feed: various object-orientation cleanups
[public-inbox.git] / lib / PublicInbox / WWW.pm
index f88894a0d02810d51c2926a8ba9915bec256c306..f1f4abd5f86d517383683bb67fc989fdcd3f0c0e 100644 (file)
@@ -206,9 +206,7 @@ sub get_index {
 # just returns a string ref for the blob in the current ctx
 sub mid2blob {
        my ($ctx) = @_;
-       require PublicInbox::MID;
-       my $path = PublicInbox::MID::mid2path($ctx->{mid});
-       $ctx->{git}->cat_file("HEAD:$path");
+       $ctx->{-inbox}->msg_by_mid($ctx->{mid});
 }
 
 # /$INBOX/$MESSAGE_ID/raw                    -> raw mbox