diff options
-rw-r--r-- | lib/PublicInbox/Config.pm | 3 | ||||
-rw-r--r-- | t/config.t | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index b6885a31..300dd88b 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -35,6 +35,9 @@ sub lookup { my %rv = map { $_ => $self->{"$pfx.$_"} } (qw(mainrepo description address)); + my $listname = $pfx; + $listname =~ s/\Apublicinbox\.//; + $rv{listname} = $listname; \%rv; } @@ -28,7 +28,8 @@ my $tmpdir = tempdir(CLEANUP => 1); is_deeply($cfg->lookup('bugs@public-inbox.org'), { 'mainrepo' => '/home/pi/bugs-main.git', 'address' => 'bugs@public-inbox.org', - 'description' => 'development discussion' + 'description' => 'development discussion', + 'listname' => 'bugs', }, "lookup matches expected output"); is($cfg->lookup('blah@example.com'), undef, |