Skip to content

Commit

Permalink
Detect VFREEBUSY and VALARM component names
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed Aug 29, 2017
1 parent f7d942b commit b0452b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion radicale/xmlutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ def _comp_match(item, filter_, scope="collection"):
return name != tag
if name != tag:
return False
if name in ("VALARM", "VFREEBUSY"):
item.collection.logger.warning("Filtering %s is not supported" % name)
return True
# Point #3 and #4 of rfc4791-9.7.1
components = ([item.item] if scope == "collection"
else list(getattr(item, "%s_list" % tag.lower())))
Expand Down Expand Up @@ -637,7 +640,8 @@ def find_tag(vobject_item):
"""Find tag from ``vobject_item``."""
if vobject_item.name == "VCALENDAR":
for component in vobject_item.components():
if component.name in ("VTODO", "VEVENT", "VJOURNAL"):
if component.name in ("VTODO", "VEVENT", "VJOURNAL",
"VFREEBUSY", "VALARM"):
return component.name
return None

Expand Down

0 comments on commit b0452b3

Please sign in to comment.