diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 1272fa7fee..1dc98762c4 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -4914,7 +4914,7 @@ class Core { if (mdn && helper.isReport()) try { - MessageHelper.Report r = parts.getReport(); + MessageHelper.Report r = parts.getReport(context); boolean client_id = prefs.getBoolean("client_id", true); String we = "dns;" + (client_id ? EmailService.getDefaultEhlo() : "example.com"); if (r != null && !we.equals(r.reporter)) { diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index a603f5a2c7..0925bef8ff 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -4244,7 +4244,7 @@ public class MessageHelper { HtmlHelper.formatPlainText(result) + ""; } else if (h.isReport()) { - Report report = new Report(h.contentType.getBaseType(), result); + Report report = new Report(h.contentType.getBaseType(), result, context); result = report.html; StringBuilder w = new StringBuilder(); @@ -4286,7 +4286,7 @@ public class MessageHelper { return sb.toString(); } - Report getReport() throws MessagingException, IOException { + Report getReport(Context context) throws MessagingException, IOException { for (PartHolder h : extra) if (h.isReport()) { String result; @@ -4297,7 +4297,7 @@ public class MessageHelper { result = Helper.readStream((InputStream) content); else result = content.toString(); - return new Report(h.contentType.getBaseType(), result); + return new Report(h.contentType.getBaseType(), result, context); } return null; } @@ -6062,7 +6062,7 @@ public class MessageHelper { String feedback; String html; - Report(String type, String content) { + Report(String type, String content, Context context) { this.type = type; StringBuilder report = new StringBuilder(); report.append("