From a8273e26334ccfc6af3627fe9a1e6c25e00e0f16 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 8 Mar 2023 00:22:16 +0100 Subject: [PATCH] Improved rule logic for templates --- src/templates.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/templates.php b/src/templates.php index 382ae2c..33e5cc2 100644 --- a/src/templates.php +++ b/src/templates.php @@ -111,6 +111,11 @@ class Template public function isValidFor(Activity $activity): bool { + // Is any trigger active? + if (!$this->triggerOnlyOnEmptyTitle && !$this->triggerAfterTimeout) { + return false; + } + if ($this->triggerOnlyOnEmptyTitle && $activity->title != "") { return false; }