Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af4fa433 authored by cketti's avatar cketti
Browse files

Mark forwarded messages as attachment

parent 6b28c5b4
Loading
Loading
Loading
Loading
+19 −19
Original line number Diff line number Diff line
@@ -235,6 +235,7 @@ public abstract class MessageBuilder {

            if (!MimeUtil.isMessage(attachment.contentType)) {
                bp.setEncoding(MimeUtility.getEncodingforType(attachment.contentType));
            }

            /*
             * TODO: Oh the joys of MIME...
@@ -254,7 +255,6 @@ public abstract class MessageBuilder {
            bp.addHeader(MimeHeader.HEADER_CONTENT_DISPOSITION, String.format(Locale.US,
                    "attachment;\r\n filename=\"%s\";\r\n size=%d",
                    attachment.name, attachment.size));
            }

            mp.addBodyPart(bp);
        }
+3 −0
Original line number Diff line number Diff line
@@ -121,6 +121,9 @@ public class MessageBuilderTest {
            "--" + BOUNDARY_1 + "\r\n" +
            "Content-Type: message/rfc822;\r\n" +
            " name=\"attach.txt\"\r\n" +
            "Content-Disposition: attachment;\r\n" +
            " filename=\"attach.txt\";\r\n" +
            " size=23\r\n" +
            "\r\n" +
            "text data in attachment" +
            "\r\n" +