1.1 --- a/imiptools/handlers/__init__.py Sun Apr 05 18:25:27 2015 +0200
1.2 +++ b/imiptools/handlers/__init__.py Sun Apr 05 18:55:24 2015 +0200
1.3 @@ -180,10 +180,11 @@
1.4 being generated 'for_organiser' or not.
1.5 """
1.6
1.7 - # Organisers employ a special transparency.
1.8 + # Organisers employ a special transparency if not attending.
1.9
1.10 if for_organiser or attr.get("PARTSTAT") != "DECLINED":
1.11 - self.update_freebusy(freebusy, periods, transp=(for_organiser and "ORG" or None))
1.12 + self.update_freebusy(freebusy, periods, transp=(
1.13 + for_organiser and not attr.get("PARTSTAT") and "ORG" or None))
1.14 else:
1.15 self.remove_from_freebusy(freebusy)
1.16
2.1 --- a/imiptools/handlers/person_outgoing.py Sun Apr 05 18:25:27 2015 +0200
2.2 +++ b/imiptools/handlers/person_outgoing.py Sun Apr 05 18:55:24 2015 +0200
2.3 @@ -30,12 +30,10 @@
2.4 def set_identity(self, from_organiser=True):
2.5
2.6 """
2.7 - Set the current user for the current object. Return attributes for the
2.8 - user if the
2.9 + Set the current user for the current object.
2.10 """
2.11
2.12 self.user, attr = uri_item(self.obj.get_item(from_organiser and "ORGANIZER" or "ATTENDEE"))
2.13 - return attr
2.14
2.15 def _record(self, from_organiser=True, update_freebusy=False):
2.16
2.17 @@ -45,7 +43,7 @@
2.18 free/busy information if 'update_freebusy' is set to a true value.
2.19 """
2.20
2.21 - attr = self.set_identity(from_organiser)
2.22 + self.set_identity(from_organiser)
2.23
2.24 # Check for event using UID.
2.25
2.26 @@ -97,7 +95,10 @@
2.27
2.28 periods = obj.get_periods_for_freebusy(self.get_tzid(), self.get_window_end())
2.29
2.30 - self.update_freebusy_for_participant(freebusy, periods, attr, from_organiser)
2.31 + # Obtain the attendance attributes for this user, if available.
2.32 +
2.33 + attendees = uri_dict(self.obj.get_value_map("ATTENDEE"))
2.34 + self.update_freebusy_for_participant(freebusy, periods, attendees.get(self.user), from_organiser)
2.35
2.36 # Remove either original recurrence or additional recurrence
2.37 # details depending on whether an additional recurrence or a