1.1 --- a/imiptools/handlers/person_outgoing.py Tue Dec 09 00:27:14 2014 +0100
1.2 +++ b/imiptools/handlers/person_outgoing.py Tue Dec 09 22:29:46 2014 +0100
1.3 @@ -13,7 +13,7 @@
1.4 "Handling mechanisms specific to people."
1.5
1.6 def _record(self, objtype, from_organiser=True, update_freebusy=False):
1.7 - identity = self.get_value(from_organiser and "ORGANIZER" or "ATTENDEE")
1.8 + identity, attr = self.get_item(from_organiser and "ORGANIZER" or "ATTENDEE")
1.9
1.10 # Check for event using UID.
1.11
1.12 @@ -36,7 +36,10 @@
1.13 periods = self.get_periods()
1.14 freebusy = self.store.get_freebusy(identity) or []
1.15
1.16 - self.update_freebusy(freebusy, identity, periods)
1.17 + if from_organiser or attr.get("PARTSTAT") == "ACCEPTED":
1.18 + self.update_freebusy(freebusy, identity, periods)
1.19 + else:
1.20 + self.remove_from_freebusy(freebusy, identity)
1.21
1.22 if self.publisher:
1.23 self.publisher.set_freebusy(identity, freebusy)