Set the D:displayname for collections in PROPFIND response

Atleast Nokia N9 shows the displayname to user. If the
property is empty, a calendar with empty name is shown.
Which is annoying.
This commit is contained in:
Oskari Timperi 2012-05-24 12:33:40 +03:00
parent b5e94598e9
commit 209b9e4307

View File

@ -299,6 +299,8 @@ def _propfind_response(path, item, props, user):
elif tag == _tag("C", "calendar-timezone"):
element.text = ical.serialize(
item.tag, item.headers, item.timezones)
elif tag == _tag("D", "displayname"):
element.text = item.name
else:
human_tag = _tag_from_clark(tag)
if human_tag in collection_props: