[CalendarServer-changes] [3897] CalendarServer/trunk/twistedcaldav/scheduling

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 19 13:35:32 PDT 2009


Revision: 3897
          http://trac.macosforge.org/projects/calendarserver/changeset/3897
Author:   sagen at apple.com
Date:     2009-03-19 13:35:32 -0700 (Thu, 19 Mar 2009)
Log Message:
-----------
Supress imip messages in the case where not all attendees have replied, and the only change is a PARTSTAT (to make imip less chatty).

Currently, there is an oustanding issue where if the last attendee to reply is via imip, that attendee won't receive an email with everyone's partstat, but all other attendees will.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/scheduling/implicit.py
    CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py

Modified: CalendarServer/trunk/twistedcaldav/scheduling/implicit.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/implicit.py	2009-03-19 20:28:06 UTC (rev 3896)
+++ CalendarServer/trunk/twistedcaldav/scheduling/implicit.py	2009-03-19 20:35:32 UTC (rev 3897)
@@ -250,9 +250,14 @@
         self.originator = self.organizer
         
         # Need to re-insert RSVP=TRUE for any NEEDS-ACTION
+
+        # We want to suppress chatty iMIP messages when other attendees reply
+        self.request.suppressRefresh = False
+
         for attendee in self.calendar.getAllAttendeeProperties():
             if attendee.params().get("PARTSTAT", ["NEEDS-ACTION"])[0] == "NEEDS-ACTION":
                 attendee.params()["RSVP"] = ["TRUE",]
+                self.request.suppressRefresh = True
         
         self.request.doing_attendee_refresh = True
         try:
@@ -673,12 +678,12 @@
             status = str(item.children[1])
             responses[recipient] = status
             
-        # Now apply to each ATTENDEE/ORGANIZER in the original data
-        self.calendar.setParameterToValueForPropertyWithValue(
-            "SCHEDULE-STATUS",
-            status,
-            "ATTENDEE" if is_organizer else "ORGANIZER",
-            recipient)
+            # Now apply to each ATTENDEE/ORGANIZER in the original data
+            self.calendar.setParameterToValueForPropertyWithValue(
+                "SCHEDULE-STATUS",
+                status,
+                "ATTENDEE" if is_organizer else "ORGANIZER",
+                recipient)
 
     @inlineCallbacks
     def doImplicitAttendee(self):

Modified: CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py	2009-03-19 20:28:06 UTC (rev 3896)
+++ CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py	2009-03-19 20:35:32 UTC (rev 3897)
@@ -368,13 +368,16 @@
         if caldav_recipients:
             yield self.generateLocalSchedulingResponses(caldav_recipients, responses, freebusy)
 
-        # Now process remote recipients
-        if remote_recipients:
-            yield self.generateRemoteSchedulingResponses(remote_recipients, responses, freebusy)
+        # To reduce chatter, we suppress certain messages
+        if not getattr(self.request, 'suppressRefresh', False):
 
-        # Now process iMIP recipients
-        if imip_recipients:
-            yield self.generateIMIPSchedulingResponses(imip_recipients, responses, freebusy)
+            # Now process remote recipients
+            if remote_recipients:
+                yield self.generateRemoteSchedulingResponses(remote_recipients, responses, freebusy)
+
+            # Now process iMIP recipients
+            if imip_recipients:
+                yield self.generateIMIPSchedulingResponses(imip_recipients, responses, freebusy)
     
         # Return with final response if we are done
         returnValue(responses)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090319/a2f0a273/attachment.html>


More information about the calendarserver-changes mailing list