Added $$signed$ and $$encrypted$ conditions

This commit is contained in:
M66B 2022-10-11 22:09:51 +02:00
parent 781738089f
commit c022d01270
2 changed files with 8 additions and 0 deletions

2
FAQ.md
View File

@ -2660,6 +2660,8 @@ $$multifrom$ (since version 1.1791)
$$automatic$ (since version 1.1862)
$$lowpriority$ (since version 1.1958)
$$highpriority$ (since version 1.1958)
$$signed$ (since version 1.1981)
$$encrypted$ (since version 1.1981)
```
Note that *regex* should be disable and that there should be no white space.

View File

@ -312,6 +312,12 @@ public class EntityRule {
} else if ("$highpriority".equals(keyword)) {
if (!EntityMessage.PRIORITIY_HIGH.equals(message.priority))
return false;
} else if ("$signed".equals(keyword)) {
if (!message.isSigned())
return false;
} else if ("$encrypted".equals(keyword)) {
if (!message.isEncrypted())
return false;
} else {
List<String> keywords = new ArrayList<>();
keywords.addAll(Arrays.asList(message.keywords));