imip-agent

Changeset

849:d3f276fb7b28
2015-10-16 Paul Boddie raw files shortlog changelog graph When handling COUNTER messages, only handle information from the sending attendee, do not reset participation status generally, and register the counter-proposal only for the sending attendee.
imiptools/handlers/person.py (file)
     1.1 --- a/imiptools/handlers/person.py	Fri Oct 16 16:11:43 2015 +0200
     1.2 +++ b/imiptools/handlers/person.py	Fri Oct 16 16:14:03 2015 +0200
     1.3 @@ -87,20 +87,18 @@
     1.4  
     1.5          (organiser, organiser_attr), attendees = oa
     1.6  
     1.7 -        # The responding attendee is regarded as not attending.
     1.8 -
     1.9 -        for attendee, attendee_attr in attendees.items():
    1.10 -            attendee_attr["PARTSTAT"] = "DECLINED"
    1.11 +        # Update the attendance for the sender.
    1.12  
    1.13 -        # Update this attendance.
    1.14 +        attendee = self.get_sending_attendee()
    1.15 +        if not attendee:
    1.16 +            return False
    1.17  
    1.18 -        if self.merge_attendance(attendees):
    1.19 -            self.update_freebusy_from_attendees(attendees)
    1.20 +        if self.merge_attendance({attendee : attendees[attendee]}):
    1.21 +            self.update_freebusy_from_attendees([attendee])
    1.22  
    1.23          # Queue any counter-proposal for perusal.
    1.24  
    1.25 -        for attendee in attendees.keys():
    1.26 -            self.store.set_counter(self.user, attendee, self.obj.to_node(), self.uid, self.recurrenceid)
    1.27 +        self.store.set_counter(self.user, attendee, self.obj.to_node(), self.uid, self.recurrenceid)
    1.28          self.store.queue_request(self.user, self.uid, self.recurrenceid, "COUNTER")
    1.29  
    1.30          return True