about summary refs log tree commit homepage
path: root/lib/PublicInbox/Smsg.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-10-27 07:54:09 +0000
committerEric Wong <e@80x24.org>2020-11-07 10:17:21 +0000
commitd42bb8077d6fe78a61458c990989667308ff1dd2 (patch)
treed48ec8cee9c6d4be4891670e0cc9baafe4b654ba /lib/PublicInbox/Smsg.pm
parentdff966c6e7e804b4e760aae39dda0b2c1a6ef30f (diff)
downloadpublic-inbox-d42bb8077d6fe78a61458c990989667308ff1dd2.tar.gz
This will be used to track cross-posted messages in the
external/detached index.
Diffstat (limited to 'lib/PublicInbox/Smsg.pm')
-rw-r--r--lib/PublicInbox/Smsg.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm
index 14086538..c0fd85fd 100644
--- a/lib/PublicInbox/Smsg.pm
+++ b/lib/PublicInbox/Smsg.pm
@@ -137,4 +137,17 @@ sub subject_normalized ($) {
         $subj;
 }
 
+sub xref3 {
+        my ($self, $doc) = @_;
+        my $end = $doc->termlist_end;
+        my $it = $doc->termlist_begin;
+        $it->skip_to('P');
+        my @ret;
+        for (; $it != $end; $it++) {
+                my $val = $it->get_termname;
+                $val =~ s/\AP// and push @ret, $val;
+        }
+        \@ret;
+}
+
 1;