From b04c5e81ca1f59c6ccc3a0847ebac0675c95cb38 Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 6 Sep 2017 00:22:38 +0200 Subject: [PATCH] Add X-WR-CALNAME and X-WR-CALDESC to serialized calendar --- radicale/storage.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/radicale/storage.py b/radicale/storage.py index aebd215..e1e1609 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -687,6 +687,16 @@ class BaseCollection: if line.startswith("END:"): depth -= 1 template = vobject.iCalendar() + displayname = self.get_meta("D:displayname") + if displayname: + template.add("X-WR-CALNAME") + template.x_wr_calname.value_param = "TEXT" + template.x_wr_calname.value = displayname + description = self.get_meta("C:calendar-description") + if description: + template.add("X-WR-CALDESC") + template.x_wr_caldesc.value_param = "TEXT" + template.x_wr_caldesc.value = description template = template.serialize() template_insert_pos = template.find("\r\nEND:VCALENDAR\r\n") + 2 assert template_insert_pos != -1