Fix bug 718387 - Accepting an invite fails (NS_ERROR_OBJECT_IS_IMMUTABLE). r=philipp
authorWolfgang Sourdeau <wsourdeau@inverse.ca>
Thu, 19 Jan 2012 23:51:38 +0100
changeset 10461 3b98674b500b31ad6819c3c39310d8f570b0a7ab
parent 10460 b43d9f97aad8bb299a5308f87e78d87fa7cb3614
child 10462 6559b1814a9bc93918aa1604d6c0fae8f0a2e662
push idunknown
push userunknown
push dateunknown
reviewersphilipp
bugs718387
Fix bug 718387 - Accepting an invite fails (NS_ERROR_OBJECT_IS_IMMUTABLE). r=philipp
calendar/base/modules/calItipUtils.jsm
--- a/calendar/base/modules/calItipUtils.jsm
+++ b/calendar/base/modules/calItipUtils.jsm
@@ -594,16 +594,17 @@ cal.itip = {
         if (invitedAttendee) { // actually is an invitation copy, fix attendee list to send REPLY
             /* We check if the attendee id matches one of of the
              * userAddresses. If they aren't equal, it means that
              * someone is accepting invitations on behalf of an other user. */
             if (aItem.calendar.aclEntry) {
                 let userAddresses = aItem.calendar.aclEntry.getUserAddresses({});
                 if (userAddresses.length > 0
                     && !cal.attendeeMatchesAddresses(invitedAttendee, userAddresses)) {
+                    invitedAttendee = invitedAttendee.clone();
                     invitedAttendee.setProperty("SENT-BY", userAddresses[0]);
                 }
             }
 
             if (aItem.organizer) {
                 let origInvitedAttendee = (aOriginalItem && aOriginalItem.getAttendeeById(invitedAttendee.id));
 
                 if (aOpType == Components.interfaces.calIOperationListener.DELETE) {