]> Sergey Matveev's repositories - public-inbox.git/commitdiff
mbox: remove feed dependency
authorEric Wong <e@80x24.org>
Mon, 20 Jun 2016 00:57:14 +0000 (00:57 +0000)
committerEric Wong <e@80x24.org>
Mon, 20 Jun 2016 00:57:36 +0000 (00:57 +0000)
We do not need feed options there (or anywhere, hopefully).

lib/PublicInbox/Mbox.pm

index 79348766c2eee950ef0945c27ba3a57aeda1b1a8..1c792c893a3ea6ee4099f9ff9fea2193a1a44f81 100644 (file)
@@ -32,19 +32,14 @@ sub emit_msg {
        foreach my $d (qw(Lines Bytes Content-Length Status)) {
                $header_obj->header_set($d);
        }
-       my $feed_opts = $ctx->{feed_opts};
-       unless ($feed_opts) {
-               require PublicInbox::Feed; # FIXME: gross
-               $feed_opts = PublicInbox::Feed::get_feedopts($ctx);
-               $ctx->{feed_opts} = $feed_opts;
-       }
-       my $base = $feed_opts->{url};
+       my $ibx = $ctx->{-inbox};
+       my $base = $ibx->base_url($ctx->{cgi});
        my $mid = mid_clean($header_obj->header('Message-ID'));
        $mid = uri_escape_utf8($mid);
        my @append = (
                'Archived-At', "<$base$mid/>",
                'List-Archive', "<$base>",
-               'List-Post', "<mailto:$feed_opts->{id_addr}>",
+               'List-Post', "<mailto:$ibx->{-primary_address}>",
        );
        my $append = '';
        my $crlf = $simple->crlf;