Inline images included twice in message: Closes #7299
This handles the case when an image is specified in the message with no Content-Disposition; in that case, use the "natural" disposition for the client (i.e. images are inline, other types are attachments).
This commit is contained in:
parent
78977b3f54
commit
6cdba3a77f
1 changed files with 8 additions and 1 deletions
|
|
@ -468,11 +468,14 @@ public class Geary.RFC822.Message : BaseObject {
|
|||
if (part == null)
|
||||
return false;
|
||||
|
||||
// Stop processing if the part is an attachment
|
||||
string? disposition = part.get_disposition();
|
||||
if (disposition != null && disposition.down() == "attachment")
|
||||
return false;
|
||||
|
||||
// Handle inline text parts
|
||||
/* Handle text parts that are not attachments
|
||||
* They may have inline disposition, or they may have no disposition specified
|
||||
*/
|
||||
GMime.ContentType content_type = part.get_content_type();
|
||||
if (content_type.get_media_type() == "text") {
|
||||
if (content_type.get_media_subtype() == text_subtype) {
|
||||
|
|
@ -484,6 +487,10 @@ public class Geary.RFC822.Message : BaseObject {
|
|||
return false;
|
||||
}
|
||||
|
||||
// If images have no disposition, they are handled elsewhere; see #7299
|
||||
if (disposition == null)
|
||||
return false;
|
||||
|
||||
// Hand off to the replacer for processing
|
||||
if (replacer == null)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue