X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwAtomStream.pm;h=5d32294eec159f58cb9b2ff7153f512c5d0d3b63;hb=45f87867107724371d80a563099ab93eda1d919b;hp=912f860ececa8e16e13a7782ae96b625d4d78bb7;hpb=8862c33ae93eea1af6246cd3c7a81e0a122186bf;p=public-inbox.git diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm index 912f860e..5d32294e 100644 --- a/lib/PublicInbox/WwwAtomStream.pm +++ b/lib/PublicInbox/WwwAtomStream.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2020 all contributors +# Copyright (C) 2016-2021 all contributors # License: AGPL-3.0+ # # Atom body stream for HTTP responses @@ -100,7 +100,11 @@ sub atom_header { } else { $title = title_tag($ibx->description); $self_url .= 'new.atom'; - $page_id = "mailto:$ibx->{-primary_address}"; + if (defined(my $addr = $ibx->{-primary_address})) { + $page_id = "mailto:$addr"; + } else { + $page_id = to_uuid($self_url); + } } qq(\n) . qq(' . strftime('%Y-%m-%dT%H:%M:%SZ', gmtime(@_)) . ''; + my ($t) = @_; + '' . strftime('%Y-%m-%dT%H:%M:%SZ', gmtime($t)) . ''; } 1;