about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/SearchView.pm2
-rw-r--r--lib/PublicInbox/Smsg.pm9
-rw-r--r--lib/PublicInbox/View.pm2
3 files changed, 5 insertions, 8 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index 91196cca..e74ddb90 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -122,7 +122,7 @@ sub mset_summary {
                 $min = $pct;
 
                 my $s = ascii_html($smsg->{subject});
-                my $f = ascii_html($smsg->{from_name});
+                my $f = ascii_html(delete $smsg->{from_name});
                 if ($obfs_ibx) {
                         obfuscate_addrs($obfs_ibx, $s);
                         obfuscate_addrs($obfs_ibx, $f);
diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm
index fb28eff7..a2f54507 100644
--- a/lib/PublicInbox/Smsg.pm
+++ b/lib/PublicInbox/Smsg.pm
@@ -57,15 +57,12 @@ sub load_from_data ($$) {
 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;
 }
 
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index a6944b80..116aa641 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -978,7 +978,7 @@ sub skel_dump { # walk_thread callback
                 $$skel .= delete($ctx->{sl_note}) || '';
         }
 
-        my $f = ascii_html($smsg->{from_name});
+        my $f = ascii_html(delete $smsg->{from_name});
         my $obfs_ibx = $ctx->{-obfs_ibx};
         obfuscate_addrs($obfs_ibx, $f) if $obfs_ibx;