|
|
|
|
@ -218,11 +218,12 @@ public class EntityRule {
|
|
|
|
|
|
|
|
|
|
static int run(Context context, List<EntityRule> rules,
|
|
|
|
|
EntityMessage message, boolean browsed, List<Header> headers, String html)
|
|
|
|
|
throws JSONException, MessagingException, IOException {
|
|
|
|
|
throws Throwable {
|
|
|
|
|
int applied = 0;
|
|
|
|
|
|
|
|
|
|
List<String> stopped = new ArrayList<>();
|
|
|
|
|
for (EntityRule rule : rules) {
|
|
|
|
|
for (EntityRule rule : rules)
|
|
|
|
|
try {
|
|
|
|
|
if (rule.group != null && stopped.contains(rule.group))
|
|
|
|
|
continue;
|
|
|
|
|
if (rule.matches(context, message, headers, html)) {
|
|
|
|
|
@ -236,6 +237,8 @@ public class EntityRule {
|
|
|
|
|
stopped.add(rule.group);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
throw new Throwable(rule.name, ex);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return applied;
|
|
|
|
|
|