Fix bug 718387 - Accepting an invite fails (NS_ERROR_OBJECT_IS_IMMUTABLE). r=philipp,a=philipp
authorWolfgang Sourdeau <wsourdeau@inverse.ca>
Thu, 19 Jan 2012 23:51:38 +0100
changeset 10111 e8183d8c8b02a941545d329c93ee3e20778c2cfa
parent 10110 df6e759ba85c2e2f000e46c6ecc416ae55d5e25c
child 10112 8e05a7b2b59316bff698ec7f1bd048b6c18e3d9a
push idunknown
push userunknown
push dateunknown
reviewersphilipp, philipp
bugs718387
Fix bug 718387 - Accepting an invite fails (NS_ERROR_OBJECT_IS_IMMUTABLE). r=philipp,a=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) {