limit only to VALARM, VFREEBUSY support was not added so far
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 3.5.4.dev
|
## 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
|
## 3.5.3
|
||||||
* Add: [auth] htpasswd: support for Argon2 hashes
|
* 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
|
# TODO: Filtering VFREEBUSY is not implemented
|
||||||
# so far only filtering based on existence of such component is implemented
|
|
||||||
# HACK: the filters are tested separately against all components
|
# HACK: the filters are tested separately against all components
|
||||||
|
|
||||||
name = filter_.get("name", "").upper()
|
name = filter_.get("name", "").upper()
|
||||||
@@ -117,7 +116,7 @@ def comp_match(item: "item.Item", filter_: ET.Element, level: int = 0) -> bool:
|
|||||||
return False
|
return False
|
||||||
if ((level == 0 and name != "VCALENDAR") or
|
if ((level == 0 and name != "VCALENDAR") or
|
||||||
(level == 1 and name not in ("VTODO", "VEVENT", "VJOURNAL")) 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)
|
logger.warning("Filtering %s is not supported", name)
|
||||||
return True
|
return True
|
||||||
# Point #3 and #4 of rfc4791-9.7.1
|
# 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:
|
if not subcomp:
|
||||||
return False
|
return False
|
||||||
if hasattr(subcomp, "trigger"):
|
if hasattr(subcomp, "trigger"):
|
||||||
|
# rfc4791-7.8.5:
|
||||||
trigger = subcomp.trigger.value
|
trigger = subcomp.trigger.value
|
||||||
for child in filter_:
|
for child in filter_:
|
||||||
if child.tag == xmlutils.make_clark("C:prop-filter"):
|
if child.tag == xmlutils.make_clark("C:prop-filter"):
|
||||||
|
|||||||
Reference in New Issue
Block a user