1.1 --- a/imiptools/handlers/person.py Sun Sep 13 20:02:49 2015 +0200
1.2 +++ b/imiptools/handlers/person.py Mon Sep 14 19:03:13 2015 +0200
1.3 @@ -72,6 +72,33 @@
1.4
1.5 return True
1.6
1.7 + def _counter(self):
1.8 +
1.9 + """
1.10 + Record details from a counter-proposal, updating the stored object with
1.11 + attendance information.
1.12 + """
1.13 +
1.14 + # Obtain valid organiser and attendee details.
1.15 +
1.16 + oa = self.require_organiser_and_attendees(from_organiser=False)
1.17 + if not oa:
1.18 + return False
1.19 +
1.20 + (organiser, organiser_attr), attendees = oa
1.21 +
1.22 + # The responding attendee is regarded as not attending.
1.23 +
1.24 + for attendee, attendee_attr in attendees.items():
1.25 + attendee_attr["PARTSTAT"] = "DECLINED"
1.26 +
1.27 + # Update this attendance.
1.28 +
1.29 + if self.merge_attendance(attendees):
1.30 + self.update_freebusy_from_attendees(attendees)
1.31 +
1.32 + return True
1.33 +
1.34 def _record(self, from_organiser=True, queue=False, cancel=False):
1.35
1.36 """
1.37 @@ -224,9 +251,12 @@
1.38
1.39 def counter(self):
1.40
1.41 + "Record a counter-proposal to a proposed event."
1.42 +
1.43 # NOTE: Queue a suggested modification to any active event.
1.44
1.45 - return self.wrap("A counter proposal to an event invitation has been received.", link=False)
1.46 + if self._counter():
1.47 + return self.wrap("A counter proposal to an event invitation has been received.", link=False)
1.48
1.49 def declinecounter(self):
1.50