about summary refs log tree commit homepage
path: root/lib/PublicInbox/WwwAtomStream.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-03-16 23:02:15 -0800
committerEric Wong <e@80x24.org>2021-03-17 19:03:12 +0000
commitbe940983157a1f8bd353cb1891f6971645c73e5d (patch)
treea101284395b2c81f9956c629f96353b8e7dd8ee7 /lib/PublicInbox/WwwAtomStream.pm
parent0a14f0a22c7d7ce35a740df574878269c0d947f5 (diff)
downloadpublic-inbox-be940983157a1f8bd353cb1891f6971645c73e5d.tar.gz
We'll try to share a bit more configuration with
extindex entries for WWW PSGI usage.
Diffstat (limited to 'lib/PublicInbox/WwwAtomStream.pm')
-rw-r--r--lib/PublicInbox/WwwAtomStream.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm
index 361e61f6..f60251b7 100644
--- a/lib/PublicInbox/WwwAtomStream.pm
+++ b/lib/PublicInbox/WwwAtomStream.pm
@@ -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(<?xml version="1.0" encoding="us-ascii"?>\n) .
         qq(<feed\nxmlns="http://www.w3.org/2005/Atom"\n) .