1.1 --- a/imipweb/resource.py Sat Oct 17 01:06:38 2015 +0200
1.2 +++ b/imipweb/resource.py Sat Oct 17 15:07:21 2015 +0200
1.3 @@ -219,17 +219,15 @@
1.4
1.5 # Communication methods.
1.6
1.7 - def send_message(self, method, sender, from_organiser, parts=None):
1.8 + def send_message(self, parts, sender, from_organiser):
1.9
1.10 """
1.11 - Create a full calendar object employing the given 'method', and send it
1.12 - to the appropriate recipients, also sending a copy to the 'sender'. The
1.13 - 'from_organiser' value indicates whether the organiser is sending this
1.14 - message (and is thus equivalent to "as organiser").
1.15 + Send the given 'parts' to the appropriate recipients, also sending a
1.16 + copy to the 'sender'. The 'from_organiser' value indicates whether the
1.17 + organiser is sending this message (and is thus equivalent to "as
1.18 + organiser").
1.19 """
1.20
1.21 - parts = parts or [self.obj.to_part(method)]
1.22 -
1.23 # As organiser, send an invitation to attendees, excluding oneself if
1.24 # also attending. The updated event will be saved by the outgoing
1.25 # handler.
1.26 @@ -318,7 +316,7 @@
1.27
1.28 self.update_dtstamp()
1.29 self.update_sequence(False)
1.30 - self.send_message(changed and "COUNTER" or "REPLY", get_address(self.user), from_organiser=False)
1.31 + self.send_message([self.obj.to_part(changed and "COUNTER" or "REPLY")], get_address(self.user), from_organiser=False)
1.32 return True
1.33
1.34 def process_created_request(self, method, to_cancel=None, to_unschedule=None):
1.35 @@ -361,7 +359,7 @@
1.36 # Send the updated event, along with a cancellation for each of the
1.37 # unscheduled occurrences.
1.38
1.39 - self.send_message("CANCEL", get_address(organiser), from_organiser=True, parts=parts)
1.40 + self.send_message(parts, get_address(organiser), from_organiser=True)
1.41
1.42 # When cancelling, replace the attendees with those for whom the event
1.43 # is now cancelled.
1.44 @@ -372,7 +370,7 @@
1.45
1.46 # Send a cancellation to all uninvited attendees.
1.47
1.48 - self.send_message("CANCEL", get_address(organiser), from_organiser=True)
1.49 + self.send_message([self.obj.to_part("CANCEL")], get_address(organiser), from_organiser=True)
1.50
1.51 # Since the organiser can update the SEQUENCE but this can leave any
1.52 # mail/calendar client lagging, issue a PUBLISH message to the user's