1.1 --- a/imiptools/handlers/person_outgoing.py Thu Feb 05 15:52:55 2015 +0100
1.2 +++ b/imiptools/handlers/person_outgoing.py Thu Feb 05 17:14:56 2015 +0100
1.3 @@ -81,7 +81,7 @@
1.4
1.5 return True
1.6
1.7 - def _remove(self, from_organiser=True):
1.8 + def _remove(self, from_organiser=True, update_freebusy=False):
1.9
1.10 "Remove free/busy information for any unprocessed object."
1.11
1.12 @@ -91,8 +91,22 @@
1.13
1.14 identity, attr = item
1.15
1.16 - freebusy = self.store.get_freebusy(identity)
1.17 - self.remove_from_freebusy(freebusy, identity)
1.18 + # Store the object, updating any sequence information.
1.19 +
1.20 + self.store.set_event(identity, self.uid, self.obj.to_node())
1.21 +
1.22 + # Remove any associated request.
1.23 +
1.24 + self.store.dequeue_request(identity, self.uid)
1.25 +
1.26 + # Update free/busy information.
1.27 +
1.28 + if update_freebusy:
1.29 + freebusy = self.store.get_freebusy(identity)
1.30 + self.remove_from_freebusy(freebusy, identity)
1.31 +
1.32 + if self.publisher:
1.33 + self.publisher.set_freebusy(identity, freebusy)
1.34
1.35 return True
1.36
1.37 @@ -104,7 +118,7 @@
1.38 pass
1.39
1.40 def cancel(self):
1.41 - self._remove(True)
1.42 + self._remove(True, True)
1.43
1.44 def counter(self):
1.45 pass