1.1 --- a/imipweb/resource.py Mon Oct 05 23:53:38 2015 +0200
1.2 +++ b/imipweb/resource.py Mon Oct 05 23:56:48 2015 +0200
1.3 @@ -260,6 +260,10 @@
1.4 if part:
1.5 parts.append(part)
1.6
1.7 + self._send_message(sender, recipients, parts)
1.8 +
1.9 + def _send_message(self, sender, recipients, parts):
1.10 +
1.11 # Explicitly specify the outgoing BCC recipient since we are sending as
1.12 # the generic calendar user.
1.13
1.14 @@ -268,6 +272,22 @@
1.15
1.16 # Action methods.
1.17
1.18 + def process_declined_counter(self, attendee):
1.19 +
1.20 + "Process a declined counter-proposal."
1.21 +
1.22 + # Obtain the counter-proposal for the attendee.
1.23 +
1.24 + obj = self.get_stored_object(self.uid, self.recurrenceid, "counters", attendee)
1.25 + if not obj:
1.26 + return False
1.27 +
1.28 + method = "DECLINECOUNTER"
1.29 + obj.update_dtstamp()
1.30 + obj.update_sequence(False)
1.31 + self._send_message(get_address(self.user), [get_address(attendee)], parts=[obj.to_part(method)])
1.32 + return True
1.33 +
1.34 def process_received_request(self):
1.35
1.36 """
1.37 @@ -284,7 +304,7 @@
1.38
1.39 self.obj["ATTENDEE"] = [(self.user, attendee_attr)]
1.40 self.update_dtstamp()
1.41 - self.set_sequence(False)
1.42 + self.update_sequence(False)
1.43 self.send_message("REPLY", get_address(self.user), from_organiser=False)
1.44 return True
1.45
1.46 @@ -307,7 +327,7 @@
1.47
1.48 self.update_sender(organiser_attr)
1.49 self.update_dtstamp()
1.50 - self.set_sequence(True)
1.51 + self.update_sequence(True)
1.52
1.53 parts = [self.obj.to_part(method)]
1.54