From 0259da113641a96898bc35b72fd75939ad9a0b8a Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 23 Dec 2020 10:14:10 +0100 Subject: [PATCH] Skip reply check for messages from self --- app/src/main/java/eu/faircode/email/Core.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 8de2c45f10..e0e496483c 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2872,8 +2872,18 @@ class Core { boolean check_reply = prefs.getBoolean("check_reply", false); if (check_reply) { - String warning = message.checkReplyDomain(context); - message.reply_domain = (warning == null); + // For contact forms + boolean self = false; + if (identity != null && message.from != null) + for (Address from : message.from) + if (identity.sameAddress(from) || identity.similarAddress(from)) { + self = true; + break; + } + if (!self) { + String warning = message.checkReplyDomain(context); + message.reply_domain = (warning == null); + } } boolean check_spam = prefs.getBoolean("check_spam", false);