about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-30 07:41:41 +0000
committerEric Wong <e@80x24.org>2016-06-30 08:57:24 +0000
commite29518088b3f4a4759280f76dd5416c376ee683e (patch)
treef0f651aaf9de72dfb80e930770a3d8e6f24f659c
parentb30bcf12bdc0c3658e5e31c02b05c3609da04e7f (diff)
downloadpublic-inbox-e29518088b3f4a4759280f76dd5416c376ee683e.tar.gz
Oops, these were only introduced during the hybrid flat thread
view reworking and never deployed.
-rw-r--r--lib/PublicInbox/View.pm17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 17d6de56..44130b90 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -103,7 +103,7 @@ sub index_entry {
         my $subj = $hdr->header('Subject');
 
         my $mid_raw = mid_clean(mid_mime($mime));
-        my $id = id_compress($mid_raw);
+        my $id = id_compress($mid_raw, 1);
         my $id_m = 'm'.$id;
         my $mid = PublicInbox::Hval->new_msgid($mid_raw);
 
@@ -119,20 +119,23 @@ sub index_entry {
                 my $dst = _hdr_names($hdr, $f);
                 push @tocc, "$f: $dst" if $dst ne '';
         }
-        my $mapping = $ctx->{mapping};
         $rv .= "From: "._hdr_names($hdr, 'From').' @ '._msg_date($hdr)." UTC";
         my $upfx = $ctx->{-upfx};
-        $rv .= qq{ (<a\nhref="$upfx$mid_raw/">permalink</a> / };
-        $rv .= qq{<a\nhref="$upfx$mid_raw/raw">raw</a>)\n};
+        my $mhref = $upfx . $mid->as_href . '/';
+        $rv .= qq{ (<a\nhref="$mhref/">permalink</a> / };
+        $rv .= qq{<a\nhref="$mhref/raw">raw</a>)\n};
         $rv .= '  '.join('; +', @tocc) . "\n" if @tocc;
+
+        my $mapping = $ctx->{mapping};
         if (!$mapping && $irt) {
-                $rv .= qq(In-Reply-To: &lt;<a\nhref="$upfx$irt/">$irt</a>&gt;\n)
+                my $mirt = PublicInbox::Hval->msgid($irt);
+                my $href = $upfx . $mirt->as_href . '/';
+                my $html = $mirt->as_html;
+                $rv .= qq(In-Reply-To: &lt;<a\nhref="$href/">$html</a>&gt;\n)
         }
         $rv .= "\n";
 
         # scan through all parts, looking for displayable text
-        my $href = $mid->as_href;
-        my $mhref = $ctx->{-upfx}.$href.'/';
         msg_iter($mime, sub { $rv .= add_text_body($mhref, $_[0]) });
 
         # add the footer