From 9cb609f21ab79b10faa50907e66f5fc4e1f1e96f Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Thu, 4 Jun 2026 18:01:06 +0000 Subject: [PATCH] nextcloud-todos: register only the Created webhook (drop Updated) The agent acts only on newly-created todos; the Updated listener re-fired on every edit (incl. the agent's own note-append). Live Updated webhook (id=2) already deleted via OCS API. --- stacks/nextcloud-todos/main.tf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stacks/nextcloud-todos/main.tf b/stacks/nextcloud-todos/main.tf index ed388a13..1ecc8538 100644 --- a/stacks/nextcloud-todos/main.tf +++ b/stacks/nextcloud-todos/main.tf @@ -383,7 +383,10 @@ resource "null_resource" "register_webhooks" { EXISTING=$(curl -fsS -H "OCS-APIRequest: true" -H "Accept: application/json" \ -u "admin:$${NC_ADMIN_APP_PW}" "$${NC}") - for EV in CalendarObjectCreatedEvent CalendarObjectUpdatedEvent; do + # ONLY the Created event — the agent is purely reactive to newly-created + # todos. Registering Updated re-fired the pipeline on every edit (incl. + # the agent's own note-append) and re-processed completed/edited todos. + for EV in CalendarObjectCreatedEvent; do # The event class is a PHP namespace: OCP\Calendar\Events\. In the # JSON body each backslash must be doubled (valid JSON escape), so the # shell var holds "\\" per separator -> the heredoc source needs four