Create new GMime.Part instances with an explicit MIME-type

This commit is contained in:
Torben 2019-12-11 23:25:59 +01:00
parent 619b6fb838
commit d98755d04f
3 changed files with 6 additions and 6 deletions

View file

@ -355,7 +355,7 @@ VALUES (2, 'text/plain');
private GMime.Part new_part(string? mime_type,
uint8[] body,
GMime.ContentEncoding encoding = GMime.ContentEncoding.DEFAULT) {
GMime.Part part = new GMime.Part();
GMime.Part part = new GMime.Part.with_type("text", "plain");
if (mime_type != null) {
part.set_content_type(GMime.ContentType.parse(
Geary.RFC822.get_parser_options(),

View file

@ -94,7 +94,7 @@ class Geary.RFC822.PartTest : TestCase {
private GMime.Part new_part(string? mime_type,
uint8[] body) {
GMime.Part part = new GMime.Part();
GMime.Part part = new GMime.Part.with_type("text", "plain");
if (mime_type != null) {
part.set_content_type(GMime.ContentType.parse(
Geary.RFC822.get_parser_options(),