[CalendarServer-changes] [2899] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 28 14:01:55 PDT 2008
Revision: 2899
http://trac.macosforge.org/projects/calendarserver/changeset/2899
Author: cdaboo at apple.com
Date: 2008-08-28 14:01:55 -0700 (Thu, 28 Aug 2008)
Log Message:
-----------
Use our own PRODID value for iTIP messages we generate.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/ical.py
CalendarServer/trunk/twistedcaldav/scheduling/itip.py
Modified: CalendarServer/trunk/twistedcaldav/ical.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/ical.py 2008-08-28 20:22:41 UTC (rev 2898)
+++ CalendarServer/trunk/twistedcaldav/ical.py 2008-08-28 21:01:55 UTC (rev 2899)
@@ -671,6 +671,17 @@
"""
self._vobject.remove(property._vobject)
+ def replaceProperty(self, property):
+ """
+ Add or replace a property in this component.
+ @param property: the L{Property} to add or replace in this component.
+ """
+
+ # Remove all existing ones first
+ for removeit in tuple(self.properties(property.name())):
+ self.removeProperty(removeit)
+ self.addProperty(property)
+
def timezoneIDs(self):
"""
Returns the set of TZID parameter values appearing in any property in
Modified: CalendarServer/trunk/twistedcaldav/scheduling/itip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/itip.py 2008-08-28 20:22:41 UTC (rev 2898)
+++ CalendarServer/trunk/twistedcaldav/scheduling/itip.py 2008-08-28 21:01:55 UTC (rev 2899)
@@ -354,6 +354,7 @@
# Start with a copy of the original as we may have to modify bits of it
itip = original.duplicate()
+ itip.replaceProperty(Property("PRODID", iCalendarProductID))
itip.addProperty(Property("METHOD", "REQUEST"))
# Now filter out components that do not contain every attendee
@@ -369,6 +370,7 @@
# Start with a copy of the original as we may have to modify bits of it
itip = original.duplicate()
+ itip.replaceProperty(Property("PRODID", iCalendarProductID))
itip.addProperty(Property("METHOD", "REPLY"))
# Remove all attendees except the one we want
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080828/add04c7a/attachment-0001.html
More information about the calendarserver-changes
mailing list