about summary refs log tree commit homepage
path: root/lib/PublicInbox/WwwAttach.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-05-10 09:42:02 +0000
committerEric Wong <e@yhbt.net>2020-05-10 19:43:46 +0000
commita91871ec6b607d73502ee447af8ccc9e4bfe5098 (patch)
tree8c13d93fc9e96eb9ff97090be24fb18cf160ef93 /lib/PublicInbox/WwwAttach.pm
parent9ab3c55b283b0cc1b4298fc95439cc1dfae14305 (diff)
downloadpublic-inbox-a91871ec6b607d73502ee447af8ccc9e4bfe5098.tar.gz
We don't have to worry about compatibility with old
installations of Email::MIME::ContentType any longer,
so save some space.
Diffstat (limited to 'lib/PublicInbox/WwwAttach.pm')
-rw-r--r--lib/PublicInbox/WwwAttach.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/WwwAttach.pm b/lib/PublicInbox/WwwAttach.pm
index 754da13f..7e8496d7 100644
--- a/lib/PublicInbox/WwwAttach.pm
+++ b/lib/PublicInbox/WwwAttach.pm
@@ -17,8 +17,7 @@ sub get_attach_i { # ->each_part callback
         my $ct = $part->content_type;
         $ct = parse_content_type($ct) if $ct;
 
-        # discrete == type, we remain Debian wheezy-compatible
-        if ($ct && (($ct->{discrete} || '') eq 'text')) {
+        if ($ct && (($ct->{type} || '') eq 'text')) {
                 # display all text as text/plain:
                 my $cset = $ct->{attributes}->{charset};
                 if ($cset && ($cset =~ /\A[a-zA-Z0-9_\-]+\z/)) {