~singpolyma/cheogram-smtp

86826cc9db516ae4771928a791fa38d52d9c9a9f — Stephen Paul Weber 26 days ago c843ccc master
Never include SMIL, even if marked as attachment
1 files changed, 5 insertions(+), 2 deletions(-)

M Email.hs
M Email.hs => Email.hs +5 -2
@@ 93,9 93,12 @@ getAttachmentsAndMedia :: (Monoid a) =>
	    -> Const a (MIME.ContentType, ByteString))
	-> MIME.MIMEMessage -> Const a MIME.MIMEMessage
getAttachmentsAndMedia = MIME.entities . filtered (\part ->
		MIME.isAttachment part || has (MIME.contentType .
		(MIME.isAttachment part || has (MIME.contentType .
			filtered (\(MIME.ContentType t _ _) ->
				t /= s"text"
			)
		) part) && has (MIME.contentType .
			filtered (\(MIME.ContentType t sub _) ->
				t /= s"text" &&
				not (t == s"application" && sub == s"smil")
			)
		) part