[Rt-commit] r12755 - rt/branches/3.8-TESTING/lib/RT/Action

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri May 30 03:46:58 EDT 2008


Author: sunnavy
Date: Fri May 30 03:46:58 2008
New Revision: 12755

Modified:
   rt/branches/3.8-TESTING/lib/RT/Action/SendEmail.pm

Log:
we want to exclude the attachment that's been used as the content of message, not only text/plain, but all the text/

Modified: rt/branches/3.8-TESTING/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Action/SendEmail.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/Action/SendEmail.pm	Fri May 30 03:46:58 2008
@@ -362,14 +362,12 @@
     $attachments->OrderBy( FIELD => 'id' );
 
     # We want to make sure that we don't include the attachment that's
-    # being sued as the "Content" of this message"
+    # being used as the "Content" of this message" unless that attachment's
+    # content type is not like text/...
     my $transaction_content_obj = $self->TransactionObj->ContentObj;
 
-    # XXX: this is legacy check of content type looks quite incorrect
-    # to me //ruz
     if (   $transaction_content_obj
-        && $transaction_content_obj->id
-        && $transaction_content_obj->ContentType =~ m{text/plain}i )
+        && $transaction_content_obj->ContentType =~ m{text/}i )
     {
         $attachments->Limit(
             ENTRYAGGREGATOR => 'AND',


More information about the Rt-commit mailing list