1.1 --- a/imiptools/handlers/person.py Thu Dec 18 23:59:30 2014 +0100
1.2 +++ b/imiptools/handlers/person.py Fri Dec 19 00:20:11 2014 +0100
1.3 @@ -22,7 +22,7 @@
1.4
1.5 "Handling mechanisms specific to people."
1.6
1.7 - def _record_and_deliver(self, objtype, from_organiser=True, queue=False):
1.8 + def _record_and_deliver(self, objtype, from_organiser=True, queue=False, cancel=False):
1.9
1.10 oa = self.require_organiser_and_attendees(from_organiser)
1.11 if not oa:
1.12 @@ -54,6 +54,8 @@
1.13
1.14 if queue:
1.15 self.store.queue_request(attendee, self.uid)
1.16 + elif cancel:
1.17 + self.store.cancel_event(attendee, self.uid)
1.18
1.19 # As organiser, update attendance.
1.20
1.21 @@ -129,11 +131,10 @@
1.22
1.23 def cancel(self):
1.24
1.25 - # NOTE: Queue a suggested modification to any active event.
1.26 + "Queue a cancellation of any active event."
1.27
1.28 - # The message is now wrapped and passed on to the recipient.
1.29 -
1.30 - return "CANCEL", MIMEText("A cancellation has been received.")
1.31 + self._record_and_deliver("VEVENT", from_organiser=True, queue=False, cancel=True)
1.32 + return self.wrap("CANCEL", "A cancellation has been received.", from_organiser=True, link=True)
1.33
1.34 def counter(self):
1.35