]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NewsGroup.pm
newsgroup: use only the first address
[public-inbox.git] / 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;