]> Sergey Matveev's repositories - public-inbox.git/commitdiff
newsgroup: use only the first address
authorEric Wong <e@80x24.org>
Sun, 20 Sep 2015 09:33:45 +0000 (09:33 +0000)
committerEric Wong <e@80x24.org>
Sun, 20 Sep 2015 09:33:45 +0000 (09:33 +0000)
public-inboxen may be aliased to multiple email addresses,
and we have always favored the first.

lib/PublicInbox/NewsGroup.pm

index b8aed529a93fd773ed15ec8a11809438df6eb1b9..0c7051db92ce65410641b33da449243c8447441c 100644 (file)
@@ -13,6 +13,7 @@ sub new {
        my ($class, $name, $git_dir, $address) = @_;
        my $self = fields::new($class);
        $self->{name} = $name;
+       $address = $address->[0] if ref($address);
        $self->{domain} = ($address =~ /\@(\S+)\z/) ? $1 : 'localhost';
        $self->{git_dir} = $git_dir;
        $self->{address} = $address;