[CalendarServer-changes] [2950] CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Tue Sep 9 07:19:32 PDT 2008
Revision: 2950
http://trac.macosforge.org/projects/calendarserver/changeset/2950
Author: cdaboo at apple.com
Date: 2008-09-09 07:19:32 -0700 (Tue, 09 Sep 2008)
Log Message:
-----------
Need to make sure that DTSTAMP is always updated for each iTIP message sent by the server.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav/ical.py
CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav/scheduling/itip.py
Modified: CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav/ical.py
===================================================================
--- CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav/ical.py 2008-09-08 16:18:02 UTC (rev 2949)
+++ CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav/ical.py 2008-09-09 14:19:32 UTC (rev 2950)
@@ -1291,7 +1291,18 @@
if component.name() == "VTIMEZONE":
continue
component.addProperty(property)
+
+ def replacePropertyInAllComponents(self, property):
+ """
+ Replace a property in all components.
+ @param property: the L{Property} to replace in this component.
+ """
+ for component in self.subcomponents():
+ if component.name() == "VTIMEZONE":
+ continue
+ component.replaceProperty(property)
+
def attendeesView(self, attendees):
"""
Filter out any components that all attendees are not present in. Use EXDATEs
Modified: CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav/scheduling/itip.py
===================================================================
--- CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav/scheduling/itip.py 2008-09-08 16:18:02 UTC (rev 2949)
+++ CalendarServer/branches/users/cdaboo/implicitauto-2947/twistedcaldav/scheduling/itip.py 2008-09-09 14:19:32 UTC (rev 2950)
@@ -429,6 +429,9 @@
itip.replaceProperty(Property("PRODID", iCalendarProductID))
itip.addProperty(Property("METHOD", "REQUEST"))
+ # Force update to DTSTAMP everywhere
+ itip.replacePropertyInAllComponents(Property("DTSTAMP", datetime.datetime.now(tz=utc)))
+
# Now filter out components that do not contain every attendee
itip.attendeesView(attendees)
@@ -445,6 +448,9 @@
itip.replaceProperty(Property("PRODID", iCalendarProductID))
itip.addProperty(Property("METHOD", "REPLY"))
+ # Force update to DTSTAMP everywhere
+ itip.replacePropertyInAllComponents(Property("DTSTAMP", datetime.datetime.now(tz=utc)))
+
# Remove all attendees except the one we want
itip.removeAllButOneAttendee(attendee)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080909/4cf9c940/attachment.html
More information about the calendarserver-changes
mailing list