limit only to VALARM, VFREEBUSY support was not added so far
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user