1.1 --- a/imiptools/client.py Wed Sep 02 17:52:52 2015 +0200
1.2 +++ b/imiptools/client.py Wed Sep 02 17:53:31 2015 +0200
1.3 @@ -266,13 +266,24 @@
1.4
1.5 # Object update methods.
1.6
1.7 + def update_recurrenceid(self):
1.8 +
1.9 + """
1.10 + Update the RECURRENCE-ID in the current object, initialising it from
1.11 + DTSTART.
1.12 + """
1.13 +
1.14 + self.obj["RECURRENCE-ID"] = [self.obj.get_datetime_item("DTSTART")]
1.15 + self.recurrenceid = self.obj.get_recurrenceid()
1.16 +
1.17 def update_dtstamp(self):
1.18
1.19 "Update the DTSTAMP in the current object."
1.20
1.21 dtstamp = self.obj.get_utc_datetime("DTSTAMP")
1.22 utcnow = to_timezone(datetime.utcnow(), "UTC")
1.23 - self.obj["DTSTAMP"] = [(format_datetime(dtstamp > utcnow and dtstamp or utcnow), {})]
1.24 + self.dtstamp = format_datetime(dtstamp > utcnow and dtstamp or utcnow)
1.25 + self.obj["DTSTAMP"] = [(self.dtstamp, {})]
1.26
1.27 def set_sequence(self, increment=False):
1.28
1.29 @@ -535,7 +546,8 @@
1.30 Update the 'freebusy' collection for this event with the periods and
1.31 transparency associated with the current object, subject to the 'user'
1.32 identity and the attendance details provided for them, indicating
1.33 - whether the update is 'for_organiser' or not.
1.34 + whether the update is being done 'for_organiser' (for the organiser of
1.35 + an event) or not.
1.36 """
1.37
1.38 # Obtain the stored object if the current object is not issued by the
1.39 @@ -569,14 +581,14 @@
1.40
1.41 """
1.42 Update the 'freebusy' collection using the given 'periods', involving
1.43 - the given 'user', indicating whether the update is 'for_organiser' or
1.44 - not, and whether it is 'updating_other' (meaning another user's
1.45 - details).
1.46 + the given 'user', indicating whether the update is 'for_organiser'
1.47 + (being done for the organiser of an event) or not, and whether it is
1.48 + 'updating_other' (meaning another user's details).
1.49 """
1.50
1.51 # Record in the free/busy details unless a non-participating attendee.
1.52 - # Use any attendee information for an organiser, not the organiser's own
1.53 - # attributes.
1.54 + # Use any attendee property information for an organiser, not the
1.55 + # organiser property attributes.
1.56
1.57 if self.is_participating(user, for_organiser and not updating_other):
1.58 self.update_freebusy(freebusy, user, for_organiser)