]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Config.pm
derive -primary_address in config
[public-inbox.git] / lib / PublicInbox / Config.pm
index c8f2a8d82721330fae86f36ab86980061c3050fa..d71bc52e203d7c79efc3f9a4c4aab14bfdb974bf 100644 (file)
@@ -64,6 +64,8 @@ sub lookup {
        my $listname = $pfx;
        $listname =~ s/\Apublicinbox\.//;
        $rv{listname} = $listname;
+       my $v = $rv{address};
+       $rv{-primary_address} = ref($v) eq 'ARRAY' ? $v->[0] : $v;
        \%rv;
 }