Allow standalone older than condition

This commit is contained in:
M66B
2025-04-09 22:41:23 +02:00
parent b982a27679
commit 0ffe5bf9e5
2 changed files with 13 additions and 3 deletions

View File

@@ -246,10 +246,11 @@ public class EntityRule {
JSONObject jcondition = new JSONObject(condition);
// general
int age = 0;
if (this.daily) {
JSONObject jgeneral = jcondition.optJSONObject("general");
if (jgeneral != null) {
int age = jgeneral.optInt("age");
age = jgeneral.optInt("age");
if (age > 0) {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(message.received);
@@ -505,7 +506,8 @@ public class EntityRule {
}
// Safeguard
if (jsender == null &&
if (age == 0 &&
jsender == null &&
jrecipient == null &&
jsubject == null &&
!jcondition.optBoolean("attachments") &&

View File

@@ -1686,7 +1686,15 @@ public class FragmentRule extends FragmentBase {
}
}
if (jsender == null &&
int age = 0;
if (daily) {
JSONObject jgeneral = jcondition.optJSONObject("general");
if (jgeneral != null)
age = jgeneral.optInt("age");
}
if (age == 0 &&
jsender == null &&
jrecipient == null &&
jsubject == null &&
!jcondition.optBoolean("attachments") &&