- my $mid = $ctx->{mid};
- my $res = $ctx->{srch}->get_thread($mid);
- return _no_thread() unless $res->{total};
-
- my $ibx = $ctx->{-inbox};
- my $html_url = $ibx->base_url($ctx->{env});
- $html_url .= PublicInbox::Hval->new_msgid($mid)->{href};
- $ctx->{-html_url} = $html_url;
- my $msgs = $res->{msgs};
- PublicInbox::WwwAtomStream->response($ctx, 200, sub {
- while (my $msg = shift @$msgs) {
- $msg = $ibx->msg_by_smsg($msg) and
- return Email::MIME->new($msg);
- }
- });
+ my $msgs = $ctx->{msgs} = $ctx->{-inbox}->over->get_thread($ctx->{mid});
+ return _no_thread() unless @$msgs;
+ PublicInbox::WwwAtomStream->response($ctx, 200, \&generate_i);