-
-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Labels
Description
The problem
Conference feature, label, and language parameters accept both strings and lists. But when you pass a list, it goes straight to vUri params without conversion, breaking iCalendar serialization.
conference = Conference(
uri="https://example.com",
feature=["AUDIO", "VIDEO"], # This breaks
label="Meeting room"
)
The to_uri()
method just dumps the list into params. iCalendar expects comma-separated strings.
What needs fixing
Convert lists to comma-separated strings before passing to vUri:
if self.feature:
params["FEATURE"] = self.feature if isinstance(self.feature, str) else ",".join(self.feature)
if self.label:
params["LABEL"] = self.label if isinstance(self.label, str) else ",".join(self.label)
if self.language:
params["LANGUAGE"] = self.language if isinstance(self.language, str) else ",".join(self.language)
Testing requirements
- String values work unchanged
- Lists convert to comma-separated format
- RFC 7986 compliance maintained
From: #877 (comment)