diff options
author | Thomas Bruederli <bruederli@kolabsys.com> | 2014-07-06 17:14:15 -0400 |
---|---|---|
committer | Thomas Bruederli <bruederli@kolabsys.com> | 2014-07-06 17:14:15 -0400 |
commit | 3b83231c0da86de019938dec586d34f8c2c52467 (patch) | |
tree | 7507621e561399d0e8ddd40cc6d7f01d8a13ebf5 | |
parent | 70e99bc6d51d625e2d1a784cf23cff627da84f5e (diff) | |
download | pykolab-3b83231c0da86de019938dec586d34f8c2c52467.tar.gz |
Restore the original list of attendees after sending an iTip REPLY with only the replying attendee
-rw-r--r-- | pykolab/xml/event.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py index 280d2fb..9f0775b 100644 --- a/pykolab/xml/event.py +++ b/pykolab/xml/event.py @@ -725,6 +725,7 @@ class Event(object): msg = MIMEMultipart() msg_from = None + attendees = None if method == "REPLY": # TODO: Make user friendly name <email> @@ -737,6 +738,7 @@ class Event(object): if attendee.get_email() == from_address: # Only the attendee is supposed to be listed in a reply attendee.set_participant_status(participant_status) + attendee.set_rsvp(False) self._attendees = [attendee] self.event.setAttendees(self._attendees) @@ -779,7 +781,7 @@ class Event(object): msg['Date'] = formatdate(localtime=True) if subject is None: - subject = _("Reservation Request for %s was %s") % (self.get_summary(), _(participant_status)) + subject = _("Invitation for %s was %s") % (self.get_summary(), _(participant_status)) msg["Subject"] = subject @@ -798,6 +800,12 @@ class Event(object): msg.attach(part) + # restore the original list of attendees + # attendees being reduced to the replying attendee above + if attendees is not None: + self._attendees = attendees + self.event.setAttendees(self._attendees) + return msg def is_recurring(self): |