# large threads in our WWW UI and the NNTP range responses.
package PublicInbox::Smsg;
use strict;
-use warnings;
-use base qw(Exporter);
+use v5.10.1;
+use parent qw(Exporter);
our @EXPORT_OK = qw(subject_normalized);
use PublicInbox::MID qw(mids references);
use PublicInbox::Address;
use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp);
+sub oidbin { pack('H*', $_[0]->{blob}) }
+
sub to_doc_data {
my ($self) = @_;
join("\n",
sub psgi_cull ($) {
my ($self) = @_;
- # ghosts don't have ->{from}
- my $from = delete($self->{from}) // '';
- my @n = PublicInbox::Address::names($from);
- $self->{from_name} = join(', ', @n);
-
# drop NNTP-only fields which aren't relevant to PSGI results:
# saves ~80K on a 200 item search result:
# TODO: we may need to keep some of these for JMAP...
- delete @$self{qw(tid to cc bytes lines)};
+ my ($f) = delete @$self{qw(from tid to cc bytes lines)};
+ # ghosts don't have ->{from}
+ $self->{from_name} = join(', ', PublicInbox::Address::names($f // ''));
$self;
}