diff --git a/CHANGELOG.md b/CHANGELOG.md index ed827be8..1d01312e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog ## 3.5.4.dev -* Improve: item filter enhanced for 3rd level supporting VALARM and VFREEBUSY (only component existence so far) +* Improve: item filter enhanced for 3rd level supporting VALARM and honoring TRIGGER (offset or absolute) ## 3.5.3 * Add: [auth] htpasswd: support for Argon2 hashes diff --git a/radicale/item/filter.py b/radicale/item/filter.py index bb3a0c41..07f04e9a 100644 --- a/radicale/item/filter.py +++ b/radicale/item/filter.py @@ -88,8 +88,7 @@ def comp_match(item: "item.Item", filter_: ET.Element, level: int = 0) -> bool: """ - # TODO: Improve filtering for VALARM and VFREEBUSY - # so far only filtering based on existence of such component is implemented + # TODO: Filtering VFREEBUSY is not implemented # HACK: the filters are tested separately against all components name = filter_.get("name", "").upper() @@ -117,7 +116,7 @@ def comp_match(item: "item.Item", filter_: ET.Element, level: int = 0) -> bool: return False if ((level == 0 and name != "VCALENDAR") or (level == 1 and name not in ("VTODO", "VEVENT", "VJOURNAL")) or - (level == 2 and name not in ("VALARM", "VFREEBUSY"))): + (level == 2 and name not in ("VALARM"))): logger.warning("Filtering %s is not supported", name) return True # Point #3 and #4 of rfc4791-9.7.1 @@ -133,6 +132,7 @@ def comp_match(item: "item.Item", filter_: ET.Element, level: int = 0) -> bool: if not subcomp: return False if hasattr(subcomp, "trigger"): + # rfc4791-7.8.5: trigger = subcomp.trigger.value for child in filter_: if child.tag == xmlutils.make_clark("C:prop-filter"):