imip-agent

Changeset

799:7de8236d3fae
2015-10-03 Paul Boddie raw files shortlog changelog graph Added support for recording counter-proposal offers.
imiptools/handlers/person_outgoing.py (file)
     1.1 --- a/imiptools/handlers/person_outgoing.py	Sat Oct 03 01:04:01 2015 +0200
     1.2 +++ b/imiptools/handlers/person_outgoing.py	Sat Oct 03 01:04:41 2015 +0200
     1.3 @@ -76,7 +76,7 @@
     1.4  
     1.5          return True
     1.6  
     1.7 -    def _record(self, from_organiser=True):
     1.8 +    def _record(self, from_organiser=True, counter=False):
     1.9  
    1.10          """
    1.11          Record details from the current object given a message originating
    1.12 @@ -122,7 +122,14 @@
    1.13  
    1.14          # Update free/busy information.
    1.15  
    1.16 -        self.update_event_in_freebusy(from_organiser)
    1.17 +        if not counter:
    1.18 +            self.update_event_in_freebusy(from_organiser)
    1.19 +
    1.20 +        # For countered proposals, record the offer in the resource's
    1.21 +        # free/busy collection.
    1.22 +
    1.23 +        else:
    1.24 +            self.update_event_in_freebusy_offers()
    1.25  
    1.26          return True
    1.27  
    1.28 @@ -216,9 +223,9 @@
    1.29  
    1.30      def counter(self):
    1.31  
    1.32 -        "Counter-proposals are tentative and do not change events."
    1.33 +        "Record an offer made by a counter-proposal."
    1.34  
    1.35 -        pass
    1.36 +        self._record(False, True)
    1.37  
    1.38      def declinecounter(self):
    1.39