2 commits - pykolab/xml
Thomas Brüderli
bruederli at kolabsys.com
Wed Jul 16 12:22:08 CEST 2014
pykolab/xml/attendee.py | 1 +
pykolab/xml/event.py | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 3b83231c0da86de019938dec586d34f8c2c52467
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Sun Jul 6 17:14:15 2014 -0400
Restore the original list of attendees after sending an iTip REPLY with only the replying attendee
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):
commit 70e99bc6d51d625e2d1a784cf23cff627da84f5e
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Sun Jul 6 17:12:57 2014 -0400
Set (modified) contactreference back to Attendee object after changing CN
diff --git a/pykolab/xml/attendee.py b/pykolab/xml/attendee.py
index b496899..56699ce 100644
--- a/pykolab/xml/attendee.py
+++ b/pykolab/xml/attendee.py
@@ -151,6 +151,7 @@ class Attendee(kolabformat.Attendee):
def set_name(self, name):
self.contactreference.set_name(name)
+ self.setContact(self.contactreference)
def set_participant_status(self, participant_status):
if participant_status in self.participant_status_map.keys():
More information about the commits
mailing list