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 F04E91F8C8 for ; Sun, 26 Sep 2021 01:42:06 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei -f reply: fix Cc: header combining Date: Sun, 26 Sep 2021 01:42:06 +0000 Message-Id: <20210926014206.21146-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: When combining lines from To: and Cc: headers, ", " needs to be used to separate them. --- lib/PublicInbox/LeiViewText.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiViewText.pm b/lib/PublicInbox/LeiViewText.pm index 34612711..1f002ccd 100644 --- a/lib/PublicInbox/LeiViewText.pm +++ b/lib/PublicInbox/LeiViewText.pm @@ -96,10 +96,11 @@ sub quote_hdr_buf ($$) { for my $f (qw(To Cc)) { for my $v ($eml->header_raw($f)) { next if $v !~ /\S/; - $cc .= $v; + $cc .= ", $v"; $to //= $v; } } + substr($cc, 0, 2, ''); # s/^, //; PublicInbox::View::fold_addresses($to); PublicInbox::View::fold_addresses($cc); _xs($to);