From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 344E91F619 for ; Sun, 23 Feb 2020 22:47:15 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] searchview: set obfuscation inbox properly Date: Sun, 23 Feb 2020 22:47:15 +0000 Message-Id: <20200223224715.28835-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We never lookup `$ctx->{-obfuscate}' anywhere, as the correct key is `$ctx->{-obfs_ibx}' since some of the address obfuscation stuff is inbox-specific. Note: some of the obfuscation stuff still needs tests, but it's low-priority at the moment since I don't think it's a good feature after all. --- lib/PublicInbox/SearchView.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 9b67b045..0bd94774 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -268,7 +268,8 @@ sub load_msgs { sub mset_thread { my ($ctx, $mset, $q) = @_; - my $msgs = $ctx->{-inbox}->search->retry_reopen(\&load_msgs, $mset); + my $ibx = $ctx->{-inbox}; + my $msgs = $ibx->search->retry_reopen(\&load_msgs, $mset); my $r = $q->{r}; my $rootset = PublicInbox::SearchThread::thread($msgs, $r ? \&sort_relevance : \&PublicInbox::View::sort_ds, @@ -285,7 +286,7 @@ sub mset_thread { $ctx->{s_nr} = scalar(@$msgs).'+ results'; # reduce hash lookups in skel_dump - $ctx->{-obfuscate} = $ctx->{-inbox}->{obfuscate}; + $ctx->{-obfs_ibx} = $ibx->{obfuscate} ? $ibx : undef; PublicInbox::View::walk_thread($rootset, $ctx, \&PublicInbox::View::pre_thread);