mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Rule refactoring
This commit is contained in:
@@ -72,7 +72,6 @@ public class EntityRule {
|
||||
JSONObject jcondition = new JSONObject(condition);
|
||||
String sender = jcondition.optString("sender", null);
|
||||
String subject = jcondition.optString("subject", null);
|
||||
String text = jcondition.optString("text", null);
|
||||
boolean regex = jcondition.optBoolean("regex", false);
|
||||
|
||||
if (sender != null && message.from != null) {
|
||||
@@ -84,13 +83,6 @@ public class EntityRule {
|
||||
if (matches(subject, message.subject, regex))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (text != null && message.content) {
|
||||
String body = message.read(context);
|
||||
String santized = HtmlHelper.sanitize(body, true);
|
||||
if (matches(text, santized, regex))
|
||||
return true;
|
||||
}
|
||||
} catch (JSONException ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user