[CalendarServer-changes] [14660] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Sat Apr 4 08:04:55 PDT 2015


Revision: 14660
          http://trac.calendarserver.org//changeset/14660
Author:   cdaboo at apple.com
Date:     2015-04-04 08:04:55 -0700 (Sat, 04 Apr 2015)
Log Message:
-----------
More trash fixes.

Modified Paths:
--------------
    CalendarServer/trunk/requirements-dev.txt
    CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py

Modified: CalendarServer/trunk/requirements-dev.txt
===================================================================
--- CalendarServer/trunk/requirements-dev.txt	2015-04-04 15:00:53 UTC (rev 14659)
+++ CalendarServer/trunk/requirements-dev.txt	2015-04-04 15:04:55 UTC (rev 14660)
@@ -8,4 +8,4 @@
 q
 tl.eggdeps
 --editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVClientLibrary/trunk@13420#egg=CalDAVClientLibrary
---editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14656#egg=CalDAVTester
+--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14659#egg=CalDAVTester

Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py	2015-04-04 15:00:53 UTC (rev 14659)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py	2015-04-04 15:04:55 UTC (rev 14660)
@@ -178,7 +178,7 @@
 
         # Locate the organizer's copy of the event.
         yield self.getRecipientsCopy()
-        if self.recipient_calendar is None:
+        if self.recipient_calendar is None or self.recipient_in_trash:
             log.debug("ImplicitProcessing - originator '%s' to recipient '%s' ignoring UID: '%s' - organizer has no copy" % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
             returnValue((True, True, False, None,))
 
@@ -457,6 +457,15 @@
         @return: C{tuple} of (processed, auto-processed, store inbox item, changes)
         """
 
+        # If we have a recipient item in the trash, remove it right now so that we treat the iTIP message as a new
+        # invite.
+        if not self.new_resource and self.recipient_in_trash:
+            yield self.deleteCalendarResource(self.recipient_calendar_resource)
+            # Reset state to make it look like a new iTIP being processed
+            self.recipient_calendar = None
+            self.recipient_calendar_resource = None
+            self.new_resource = True
+
         # If there is no existing copy, then look for default calendar and copy it here
         if self.new_resource:
 
@@ -546,14 +555,6 @@
                 # Update the attendee's copy of the event
                 log.debug("ImplicitProcessing - originator '%s' to recipient '%s' processing METHOD:REQUEST, UID: '%s' - updating event" % (self.originator.cuaddr, self.recipient.cuaddr, self.uid))
 
-                # Only move from trash if attendee is not fully declined:
-                if self.recipient_in_trash:
-                    attendees = self.message.getAttendeeProperties((self.recipient.cuaddr,))
-                    if not all([attendee.parameterValue("PARTSTAT", "NEEDS-ACTION") == "DECLINED" for attendee in attendees]):
-                        yield self.recipient_calendar_resource.fromTrash()
-                    else:
-                        store_inbox = False
-
                 new_resource = (yield self.writeCalendarResource(None, self.recipient_calendar_resource, new_calendar))
 
                 if send_reply:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150404/c9afbca9/attachment.html>


More information about the calendarserver-changes mailing list