lib/PublicInbox/Config.pm | 2 +- t/config.t | 6 ++++++ diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 55019e9f407d1b60f5cb0d3be19867a1d062111e..28b5bdb5f895547909694f4c4916b9d7297f439e 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -136,7 +136,7 @@ my $rv = {}; foreach my $k (qw(mainrepo address filter url newsgroup infourl watch watchheader httpbackendmax - feedmax)) { + feedmax nntpserver)) { my $v = $self->{"$pfx.$k"}; $rv->{$k} = $v if defined $v; } diff --git a/t/config.t b/t/config.t index 040e9fb2dee6a8ab133bad648a88c8c938845026..3ba61119728fbad52c80c036d23007aae5359027 100644 --- a/t/config.t +++ b/t/config.t @@ -78,6 +78,12 @@ my %tmp = %h; my $cfg = PublicInbox::Config->new(\%tmp); my $ibx = $cfg->lookup_name('test'); is($ibx->{nntpserver}, 'news.example.com', 'global NNTP server'); + + delete $h{'publicinbox.nntpserver'}; + $h{"$pfx.nntpserver"} = 'news.alt.example.com'; + $cfg = PublicInbox::Config->new(\%h); + $ibx = $cfg->lookup_name('test'); + is($ibx->{nntpserver}, 'news.alt.example.com','per-inbox NNTP server'); } done_testing();