- my $hdr = $ctx->{hdr} = $mime->header_obj;
- $ctx->{obuf} = _msg_page_prepare_obuf($hdr, $ctx, 0);
- $ctx->{smsg} = $smsg;
- # $next cannot be true w/o $smsg being defined:
- $ctx->{mhref} = $next ? '../'.mid_href($smsg->{mid}).'/' : '';
- multipart_text_as_html($mime, $ctx);
- $ctx->{-html_tip} = (${delete $ctx->{obuf}} .= '</pre><hr>');
- PublicInbox::WwwStream->response($ctx, 200, \&msg_page_i);
-}
-
-sub msg_page_more { # cold
- my ($ctx, $nr, $id, $prev, $smsg) = @_;
- my $ibx = $ctx->{-inbox};
- my $next = $ibx->over->next_by_mid($ctx->{mid}, \$id, \$prev);
- $ctx->{more} = [ $id, $prev, $next ] if $next;
- $smsg = $ibx->smsg_mime($smsg) or return '';
- $ctx->{mhref} = '../' . mid_href($smsg->{mid}) . '/';
- my $mime = delete $smsg->{mime};
- $ctx->{obuf} = _msg_page_prepare_obuf($mime->header_obj, $ctx, $nr);
- multipart_text_as_html($mime, $ctx);
- ${delete $ctx->{obuf}} .= '</pre><hr>';
+ my $over = $ibx->over or return no_over_html($ctx);
+ my ($id, $prev);
+ my $next_arg = $ctx->{next_arg} = [ $ctx->{mid}, \$id, \$prev ];
+
+ my $smsg = $ctx->{smsg} = $over->next_by_mid(@$next_arg) or
+ return; # undef == 404
+
+ # allow user to easily browse the range around this message if
+ # they have ->over
+ $ctx->{-t_max} = $smsg->{ts};
+ $ctx->{-spfx} = '../' if $ibx->{coderepo};
+ PublicInbox::WwwStream::aresponse($ctx, \&msg_page_i);