From 2c198da3fcb40ee0b5017a1db3326e6df244cbc4 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Thu, 11 Jun 2026 08:51:54 +0200 Subject: [PATCH] sharing/bday/template: change trigger separator --- DOCUMENTATION.md | 2 +- config | 2 +- radicale/sharing/__init__.py | 2 +- radicale/tests/test_sharing.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 8b3f041b..957c0e81 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -2346,7 +2346,7 @@ Global template for alarm trigger of conversion "bday" Default: `` -Supported format: `TIMEDELTA;DESCRIPTION` (separated by `|` if more alarms should be generated) +Supported format: `TIMEDELTA;DESCRIPTION` (separated by `$` if more alarms should be generated) Supported format for `TIMEDELTA`: `[+-]?[0-9]+[WDHM]` diff --git a/config b/config index 77f42526..904986a6 100644 --- a/config +++ b/config @@ -363,7 +363,7 @@ #conversion_bday_description_template = BDAY={year}-{month}-{day} # Global template of alarm trigger of conversion "bday" -# Example: "-15H;BDAY tomorrow|9H;BDAY today" +# Example: "-15H;BDAY tomorrow$9H;BDAY today" #conversion_bday_alarm_trigger_template = "" # Global categories of conversion "bday" diff --git a/radicale/sharing/__init__.py b/radicale/sharing/__init__.py index fbbde5b5..431d7b9d 100644 --- a/radicale/sharing/__init__.py +++ b/radicale/sharing/__init__.py @@ -163,7 +163,7 @@ def check_template_not_empty(data: Any) -> str: def check_template_alarm_trigger(data: Any) -> str: if data is not None and data != '': - for entry in data.split('|'): + for entry in data.split('$'): try: (trigger, alarm_description) = entry.split(';') except ValueError: diff --git a/radicale/tests/test_sharing.py b/radicale/tests/test_sharing.py index d44f53f5..2a428f1f 100644 --- a/radicale/tests/test_sharing.py +++ b/radicale/tests/test_sharing.py @@ -5020,7 +5020,7 @@ permissions: RrWw""") self.configure({"sharing": { "conversion_bday_summary_template": "[{fn}|{n:f} {n:g} {n:a}|{nickname}] (BDAY)", "conversion_bday_description_template": "BDAY={year}-{month}-{day}", - "conversion_bday_alarm_trigger_template": "-15H;BDAY tomorrow|9H;BDAY today", + "conversion_bday_alarm_trigger_template": "-15H;BDAY tomorrow$9H;BDAY today", }}) # verify content as user @@ -5083,7 +5083,7 @@ permissions: RrWw""") assert "TRIGGER:-PT15H" in answer assert "TRIGGER:PT9H" in answer - self.configure({"sharing": {"conversion_bday_alarm_trigger_template": "-12H;Birthday tomorrow of {fn}|12H;Birthday today of {n:g} {n:f}"}}) + self.configure({"sharing": {"conversion_bday_alarm_trigger_template": "-12H;Birthday tomorrow of {fn}$12H;Birthday today of {n:g} {n:f}"}}) logging.info("\n*** GET collection user format: description -> ok") _, headers, answer = self.request("GET", path_shared_3, login="user:userpw") assert "DESCRIPTION:Birthday tomorrow of Test-FN-C3" in answer