From: Eric Wong Date: Mon, 21 Apr 2014 19:29:32 +0000 (+0000) Subject: feed: fix address when multiple addresses exist X-Git-Tag: v1.0.0~1214 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=bd8fd095067b79a0d2a40bbca2b27b923d02b3f8 feed: fix address when multiple addresses exist This needs to be cleaned up --- diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 8cc8b728..3fc3775b 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -32,7 +32,8 @@ sub generate { local $ENV{GIT_DIR} = $args->{git_dir}; my $feed_opts = get_feedopts($args); - + my $addr = $feed_opts->{address}; + $addr = $addr->[0] if ref($addr); my $feed = XML::Atom::SimpleFeed->new( title => $feed_opts->{description} || "unnamed feed", link => $feed_opts->{url} || "http://example.com/", @@ -41,7 +42,7 @@ sub generate { href => $feed_opts->{atomurl} || "http://example.com/atom.xml", }, - id => $feed_opts->{address} || 'public-inbox@example.com', + id => $addr || 'public-inbox@example.com', updated => POSIX::strftime(DATEFMT, gmtime), );