From 956abe9ad5f13a0d1755262be412d6a54fda72e9 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Mon, 26 Mar 2018 19:33:18 +0000 Subject: view: depend on SearchMsg for Message-ID Since we need to handle messages with multiple and duplicate Message-ID headers, our thread skeleton display must account for that. Since we have a "preferred" Message-ID in case of conflicts, use it as the UUID in an Atom feed so readers do not get confused by conflicts. --- lib/PublicInbox/WwwAtomStream.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/WwwAtomStream.pm') diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm index bb574a7c..38eba2a0 100644 --- a/lib/PublicInbox/WwwAtomStream.pm +++ b/lib/PublicInbox/WwwAtomStream.pm @@ -33,8 +33,8 @@ sub response { sub getline { my ($self) = @_; if (my $middle = $self->{cb}) { - my $mime = $middle->(); - return feed_entry($self, $mime) if $mime; + my $smsg = $middle->(); + return feed_entry($self, $smsg) if $smsg; } delete $self->{cb} ? '' : undef; } @@ -92,10 +92,11 @@ sub mid2uuid ($) { # returns undef or string sub feed_entry { - my ($self, $mime) = @_; + my ($self, $smsg) = @_; my $ctx = $self->{ctx}; + my $mime = $smsg->{mime}; my $hdr = $mime->header_obj; - my $mid = mid_clean($hdr->header_raw('Message-ID')); + my $mid = $smsg->mid; my $irt = PublicInbox::View::in_reply_to($hdr); my $uuid = mid2uuid($mid); my $base = $ctx->{feed_base_url}; -- cgit v1.2.3-24-ge0c7