msgs with only text/html not accepted as such

This commit is contained in:
Matthew Wilson 2006-05-19 20:16:37 +00:00
parent 14428c3122
commit 92a5ab6414

View file

@ -75,7 +75,7 @@ sub addPost {
my $content = "";
my $class = (ref $parent eq "WebGUI::Asset::Wobject::Collaboration") ? "WebGUI::Asset::Post::Thread" : "WebGUI::Asset::Post";
foreach my $part (@{$message->{parts}}) {
if (($part->{type} eq "text/plain" || $part->{type} eq "text/html") && $part->{filename} eq "") {
if (($part->{type} =~ /^text\/plain/ || $part->{type} =~ /^text\/html/) && $part->{filename} eq "") {
my $text = $part->{content};
if ($part->{type} eq "text/plain") {
$text =~ s/\n/\<br \/\>/g;