From 5f4c1f1ce1b1b711ce9875f5abc0b4c4745cc6bc Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 30 Apr 2024 07:45:25 +0200 Subject: [PATCH] Refactoring --- FAQ.md | 2 +- app/src/main/java/eu/faircode/email/ExpressionHelper.java | 2 +- index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FAQ.md b/FAQ.md index a03b8c7796..30054422ff 100644 --- a/FAQ.md +++ b/FAQ.md @@ -2785,7 +2785,7 @@ The following extra functions are available: * *attachments()* (returns an integer indicating number of attachments; since version 1.2179) * *Jsoup()* (returns an array of selected strings; since version 1.2179) * *Size(array)* (returns the number of items in an array; since version 1.2179) -* *Known()* (returns a boolean indicating that the from/reply-to address is in the Android address book or in the local contacts database) +* *knownContact()* (returns a boolean indicating that the from/reply-to address is in the Android address book or in the local contacts database) Example conditions: diff --git a/app/src/main/java/eu/faircode/email/ExpressionHelper.java b/app/src/main/java/eu/faircode/email/ExpressionHelper.java index 55c17d7f5e..c378d6f2cd 100644 --- a/app/src/main/java/eu/faircode/email/ExpressionHelper.java +++ b/app/src/main/java/eu/faircode/email/ExpressionHelper.java @@ -114,7 +114,7 @@ public class ExpressionHelper { configuration.getFunctionDictionary().addFunction("attachments", fAttachments); configuration.getFunctionDictionary().addFunction("Jsoup", fJsoup); configuration.getFunctionDictionary().addFunction("Size", fSize); - configuration.getFunctionDictionary().addFunction("Known", fKnown); + configuration.getFunctionDictionary().addFunction("knownContact", fKnown); configuration.getOperatorDictionary().addOperator("Contains", oContains); configuration.getOperatorDictionary().addOperator("Matches", oMatches); diff --git a/index.html b/index.html index 98e08785d6..294ce84da3 100644 --- a/index.html +++ b/index.html @@ -1524,7 +1524,7 @@ X-Google-Original-From: Somebody <somebody+extra@example.org>
  • attachments() (returns an integer indicating number of attachments; since version 1.2179)
  • Jsoup() (returns an array of selected strings; since version 1.2179)
  • Size(array) (returns the number of items in an array; since version 1.2179)
  • -
  • Known() (returns a boolean indicating that the from/reply-to address is in the Android address book or in the local contacts database)
  • +
  • knownContact() (returns a boolean indicating that the from/reply-to address is in the Android address book or in the local contacts database)
  • Example conditions:

    header("X-Mailer") contains "Open-Xchange" && from matches ".*service@.*"