Fix rule parameter not needed anymore

This commit is contained in:
Nicolas Werner 2022-07-04 22:07:52 +02:00
parent 365ec8ef72
commit 144d6c99a6
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ data class PushCondition(
val iz: String? = null
) {
fun asExecutableCondition(rule: PushRule): Condition? {
fun asExecutableCondition(): Condition? {
return when (Kind.fromString(kind)) {
Kind.EventMatch -> {
if (key != null && pattern != null) {

View file

@ -28,7 +28,7 @@ internal class PushRuleFinder @Inject constructor(
return rules.firstOrNull { rule ->
// All conditions must hold true for an event in order to apply the action for the event.
rule.enabled && rule.conditions?.all {
it.asExecutableCondition(rule)?.isSatisfied(event, conditionResolver) ?: false
it.asExecutableCondition()?.isSatisfied(event, conditionResolver) ?: false
} ?: false
}
}