about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchMsg.pm
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-03 04:00:09 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-03-03 06:47:14 +0000
commit3f2d9e30255824da52bca422d07e97e0859500e2 (patch)
treeec2eac56c92649b696a5b2ebaa1067867a53c684 /lib/PublicInbox/SearchMsg.pm
parent44ff716b116f10ae42372f9f517356000636e571 (diff)
downloadpublic-inbox-3f2d9e30255824da52bca422d07e97e0859500e2.tar.gz
It's possible to have a message handle multiple terms;
so use this feature to ensure messages with multiple MIDs
can be found by either one.
Diffstat (limited to 'lib/PublicInbox/SearchMsg.pm')
-rw-r--r--lib/PublicInbox/SearchMsg.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index 014f4909..a5565345 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -176,4 +176,11 @@ sub path {
         $self->{path} = _get_term_val($self, 'XPATH', qr/\AXPATH/); # path
 }
 
+sub type {
+        my ($self) = @_;
+        my $type = $self->{type};
+        return $type if defined $type;
+        $self->{type} = _get_term_val($self, 'T', qr/\AT/);
+}
+
 1;