# HG changeset patch # User Paul Boddie # Date 1441319196 -7200 # Node ID fad0c1540cf8ffd984bd6337603223c5e871b7ad # Parent 3445a0541b398cec3dfcea44faf68235204d2776 Introduced tentative support for handling outgoing ADD method messages. diff -r 3445a0541b39 -r fad0c1540cf8 imiptools/handlers/person_outgoing.py --- a/imiptools/handlers/person_outgoing.py Fri Sep 04 00:10:55 2015 +0200 +++ b/imiptools/handlers/person_outgoing.py Fri Sep 04 00:26:36 2015 +0200 @@ -38,6 +38,39 @@ self.user, attr = uri_item(self.obj.get_item(from_organiser and "ORGANIZER" or "ATTENDEE")) + def _add(self): + + "Add a recurrence for the current object." + + self.set_identity() + + # Obtain valid organiser and attendee details. + + oa = self.require_organiser_and_attendees() + if not oa: + return False + + (organiser, organiser_attr), attendees = oa + + # Ignore unknown objects. + + if not self.get_stored_object_version(): + return + + # Record the event as a recurrence of the parent object. + + self.update_recurrenceid() + + # Update free/busy information. + + self.update_event_in_freebusy() + + # Set the additional occurrence. + + self.store.set_event(self.user, self.uid, self.recurrenceid, self.obj.to_node()) + + return True + def _record(self, from_organiser=True): """ @@ -153,7 +186,7 @@ "An event handler." def add(self): - pass + self._add() def cancel(self): self._remove(True)