From 007cb8774e7013e2aaca32003bbd1653e3d8582f Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Fri, 23 Mar 2018 20:29:24 +0000 Subject: view: permalink (per-message) view shows multiple messages This needs tests and further refinement, but current tests pass. --- lib/PublicInbox/SearchMsg.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/PublicInbox/SearchMsg.pm') diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm index dd3d58d0..b944868f 100644 --- a/lib/PublicInbox/SearchMsg.pm +++ b/lib/PublicInbox/SearchMsg.pm @@ -24,6 +24,13 @@ sub wrap { bless { doc => $doc, mime => undef, mid => $mid }, $class; } +sub get { + my ($class, $head, $db, $mid) = @_; + my $doc_id = $head->get_docid; + my $doc = $db->get_document($doc_id); + load_expand(wrap($class, $doc, $mid)) +} + sub get_val ($$) { my ($doc, $col) = @_; Search::Xapian::sortable_unserialise($doc->get_value($col)); -- cgit v1.2.3-24-ge0c7