]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei -f reply: fix Cc: header combining
authorEric Wong <e@80x24.org>
Sun, 26 Sep 2021 01:42:06 +0000 (01:42 +0000)
committerEric Wong <e@80x24.org>
Sun, 26 Sep 2021 01:43:34 +0000 (01:43 +0000)
When combining lines from To: and Cc: headers, ", " needs to be
used to separate them.

lib/PublicInbox/LeiViewText.pm

index 3461271191bce865a4e8c48d1d2e6a495fa8f558..1f002ccd06fb3d10e169431a84d2461070f11fe3 100644 (file)
@@ -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);