summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-27 18:51:09 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-27 18:51:09 (GMT)
commitef305bbbb48e7136ea8b81972395af779c1c12df (patch)
treec73cea4bdcdac619f3d9dea6fd434e4dc93fbaf9
parent594066c70da3e574cc1c6fa15a3516e0f4d25eb7 (diff)
downloadpykolab-ef305bbbb48e7136ea8b81972395af779c1c12df.tar.gz
Don't change partstat on new invitations saved to calendar (#4948)
-rw-r--r--wallace/module_invitationpolicy.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wallace/module_invitationpolicy.py b/wallace/module_invitationpolicy.py
index ca7aba5..fea5ec8 100644
--- a/wallace/module_invitationpolicy.py
+++ b/wallace/module_invitationpolicy.py
@@ -428,7 +428,9 @@ def process_itip_request(itip_event, policy, recipient_email, sender_email, rece
log.debug(_("Precondition for object %r fulfilled: %r") % (itip_event['uid'], condition_fulfilled), level=5)
- respond_with = None
+ if existing:
+ respond_with = None
+
if policy & ACT_ACCEPT and condition_fulfilled:
respond_with = 'TENTATIVE' if policy & COND_TENTATIVE else 'ACCEPTED'
@@ -475,7 +477,7 @@ def process_itip_request(itip_event, policy, recipient_email, sender_email, rece
elif policy & ACT_SAVE_TO_FOLDER:
# copy the invitation into the user's default folder with PARTSTAT=NEEDS-ACTION
- itip_event['xml'].set_attendee_participant_status(receiving_attendee, 'NEEDS-ACTION')
+ itip_event['xml'].set_attendee_participant_status(receiving_attendee, respond_with or 'NEEDS-ACTION')
save_object = True
else: